tries to remove extraneous output and to log everything
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Wed, 7 Nov 2007 12:28:06 +0000 (12:28 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Wed, 7 Nov 2007 12:28:06 +0000 (12:28 +0000)
scripts/nightly-build-vserver.sh

index 1a312e0..b1a98aa 100755 (executable)
@@ -202,7 +202,8 @@ function main () {
            # create vserver: check it does not exist yet
            i=
            while [ -d /vservers/${BASE}${i} ] ; do
-               [ -z ${i} ] && BASE=${BASE}.
+               # we name subsequent builds <base>-n<i> so the logs and builds get sorted properly
+               [ -z ${i} ] && BASE=${BASE}-n
                i=$((${i}+1))
                if [ $i -gt 100 ] ; then
                    echo "$COMMAND: Failed to create release directory /vservers/${BASE}${i}"
@@ -224,9 +225,9 @@ function main () {
            vserver ${BASE} exec svn checkout ${SVNPATH} /build  >> $LOG 2>&1
        fi
 
+       echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX preparation of vserver $BASE done" $(date) >> $LOG 2>&1
        cp $COMMANDPATH /vservers/${BASE}/
        # invoke this command in the vserver
-       echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX preparation of vserver $BASE done" $(date)
        vserver ${BASE} exec /$COMMAND "$@"  >> $LOG 2>&1
 
     else
@@ -235,7 +236,7 @@ function main () {
            touch /build-ok
        fi
     
-       # does not work yet
+       # xxx - need to gather builds under the build index before we can re-enable this
        #if [ -n "$DO_TEST" ] ; then 
        #runtest ${BUILD} 
        #fi