support for %d in BASE
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Mon, 19 Mar 2007 13:38:38 +0000 (13:38 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Mon, 19 Mar 2007 13:38:38 +0000 (13:38 +0000)
scripts/nightly-build.sh

index 6bbd91e..dea023e 100755 (executable)
@@ -107,7 +107,7 @@ function usage () {
   echo "This is revision $REVISION"
   echo "Supported options"
   echo " -v verbose"
-  echo " -b BASE"
+  echo " -b BASE - may include %d then is replaced with current date"
   echo " -u : uses directory given as BASE as is, even if already exists"
   echo " -e : exits (does nothing) if BASE already exists"
   echo " -c CVSROOT"
@@ -154,6 +154,8 @@ function main () {
     ### set BASE from DISTRO, if unspecified
     [ -z "$BASE" ] && BASE=${DISTRO}
 
+    BASE=$(echo ${BASE} | sed -e "s,%d,$(DATE),g")
+
     if [ -n "$EXITIFOLD" -a -d "$BASE" ] ; then
       echo "$COMMAND: -e : exits on existing base directory $BASE"
       BUILD=$ROOT/$BASE