build trunk 32&64
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Sat, 12 Apr 2008 06:29:08 +0000 (06:29 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Sat, 12 Apr 2008 06:29:08 +0000 (06:29 +0000)
scripts/all-builds.sh

index a3cc3b6..25e6e80 100755 (executable)
@@ -28,6 +28,15 @@ if [ -z "$BITS" ] ;   then BITS=$DEFAULT_BITS ;           else manual=true ; fi
 [ -n "$TEST" ] &&      { extra_option="$extra_option -T" ; manual=true ; }
 [ -n "$DRY_RUN" ] &&   { manual=true ; }
 
+function run () {
+    [ -n "$manual" ] && echo "$@"
+    if [ -n "$DRY_RUN" ] ; then
+       echo "dry-run: skipped"
+    else
+       "$@"
+    fi
+}
+
 for d in $PLDISTROS ; do
     for f in $FCDISTROS ; do 
        for bits in $BITS; do
@@ -36,24 +45,19 @@ for d in $PLDISTROS ; do
                -f $f -p $p -d $d \
                -t ${d}-tags-4.2.mk \
                -b @DATE@--${d}.4.2--${f}-${bits} $extra_option"
-           [ -n "$manual" ] && echo $command
-           if [ -n "$DRY_RUN" ] ; then
-               echo "dry-run: skipped"
-           else
-               $command
-           fi
+           run $command
        done
     done
 done
 
+[ -n "$manual" -a -z "$DRY-RUN" ] && { echo 'manual mode : bailing out' ; exit 0 ; }
+
 # raw - std planetlab x f8 x 32bits for deploying on alpha nodes
-command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org -b @DATE@-trunk"
-if [ -n "$manual" ] ; then
-    echo $command
-    echo "manual/dry_run: skipped"
-else
-    $command
-fi
+for bits in 32 64; do
+    p=linux${bits}
+    command="/root/bin/vbuild-nightly.sh -m onelab-build@one-lab.org -p $p -b @DATE@--trunk${bits}"
+    run $command
+done
 
 # the following gets skipped in any manual mode 
 # centos5 : for both archs, make the vserver rpms
@@ -64,11 +68,6 @@ for d in onelab ; do
            -f centos5 -p $p -d $d \
            -b @DATE@-trunk-c5vs-${bits} \
            -B vserver"
-       if [ -n "$manual" ] ; then
-           echo $command
-           echo "manual/dry_run: skipped"
-       else
-           $command
-       fi
+       run command
     done
 done