From: thierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Date: Thu, 8 Mar 2007 14:56:00 +0000 (+0000)
Subject:  unless -b is provided, always puts TAG and DATE in base
X-Git-Tag: foo~521
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0a6062f05ae8adf9866f034a85749d3e56c466fd;p=infrastructure.git

 unless -b is provided, always puts TAG and DATE in base
---

diff --git a/scripts/nightly-build.sh b/scripts/nightly-build.sh
index 9d1629e..fdcc2dd 100755
--- a/scripts/nightly-build.sh
+++ b/scripts/nightly-build.sh
@@ -135,8 +135,8 @@ function main () {
     MAKETARGETS="$@"
 
     cd $ROOT
-    ### set BASE if unspecified, from TAG
-    [ -z "$BASE" ] && BASE=${TAG/HEAD/${DATE}}
+    ### set BASE from TAG, if unspecified
+    [ -z "$BASE" ] && BASE=${TAG}
 
     if [ -n "$EXITIFOLD" -a -d "$BASE" ] ; then
       echo "$COMMAND: -e : exits on existing base directory $BASE"
@@ -148,10 +148,7 @@ function main () {
     if [ -n "$USEOLD" ] ; then
       use_base $BASE
     else
-      # base is not the date, it's probably a tag or whatever
-      if [ "$BASE" != "$DATE" ] ; then
-        [ -d "$BASE" ] && BASE=${BASE}-${DATE}
-      fi
+      BASE=${BASE}--${DATE}
       create_base
     fi
     BUILD=$ROOT/$BASE