lrde-upload.sh: Add support for git branches

This commit is contained in:
Alexandre Duret-Lutz 2010-03-03 12:32:21 +01:00
parent 96cc3a3f67
commit 8405838347

View file

@ -6,10 +6,18 @@
set -e set -e
set -x set -x
rm -rf /lrde/dload/spot/spot-snapshot.tmp # Buildbot will tell us the name of the branch being compiled using $1.
cp -pR doc/spot.html /lrde/dload/spot/spot-snapshot.tmp rev=$1
chmod -R a+rX /lrde/dload/spot/spot-snapshot.tmp
mv -f spot-*.tar.gz /lrde/dload/spot/spot-snapshot.tar.gz case $rev in
chmod a+rX /lrde/dload/spot/spot-snapshot.tar.gz master) rev=;;
rm -rf /lrde/dload/spot/spot-snapshot.html *) rev="-$rev";;
mv -f /lrde/dload/spot/spot-snapshot.tmp /lrde/dload/spot/spot-snapshot.html esac
rm -rf /lrde/dload/spot/spot-snapshot$rev.tmp
cp -pR doc/spot.html /lrde/dload/spot/spot-snapshot$rev.tmp
chmod -R a+rX /lrde/dload/spot/spot-snapshot$rev.tmp
mv -f spot-*.tar.gz /lrde/dload/spot/spot-snapshot$rev.tar.gz
chmod a+rX /lrde/dload/spot/spot-snapshot$rev.tar.gz
rm -rf /lrde/dload/spot/spot-snapshot$rev.html
mv -f /lrde/dload/spot/spot-snapshot$rev.tmp /lrde/dload/spot/spot-snapshot$rev.html