From: thierry Date: Mon, 19 Mar 2007 13:38:38 +0000 (+0000) Subject: support for %d in BASE X-Git-Tag: foo~504 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f40890a49657b267018286a93b116485fdc0e54d;p=infrastructure.git support for %d in BASE --- diff --git a/scripts/nightly-build.sh b/scripts/nightly-build.sh index 6bbd91e..dea023e 100755 --- a/scripts/nightly-build.sh +++ b/scripts/nightly-build.sh @@ -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