From 8405838347d282ca2ae7829aa5f3ac10e7f440c3 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 3 Mar 2010 12:32:21 +0100 Subject: [PATCH] lrde-upload.sh: Add support for git branches --- lrde-upload.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lrde-upload.sh b/lrde-upload.sh index 989c92c59..67d6ca4dd 100755 --- a/lrde-upload.sh +++ b/lrde-upload.sh @@ -6,10 +6,18 @@ set -e set -x -rm -rf /lrde/dload/spot/spot-snapshot.tmp -cp -pR doc/spot.html /lrde/dload/spot/spot-snapshot.tmp -chmod -R a+rX /lrde/dload/spot/spot-snapshot.tmp -mv -f spot-*.tar.gz /lrde/dload/spot/spot-snapshot.tar.gz -chmod a+rX /lrde/dload/spot/spot-snapshot.tar.gz -rm -rf /lrde/dload/spot/spot-snapshot.html -mv -f /lrde/dload/spot/spot-snapshot.tmp /lrde/dload/spot/spot-snapshot.html +# Buildbot will tell us the name of the branch being compiled using $1. +rev=$1 + +case $rev in + master) rev=;; + *) rev="-$rev";; +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