#!/bin/bash if [ "$1" != "wrap" ]; then # the stuff we usually do (what this script originally contained) echo "RUNNING GS2 CAVEAT at " `date` > out.txt env >> out.txt cd /home/sjm84/envi/bin ./envi gs2-caveat $* else # $1 = "wrap" # On the 32 bit linux, the wrapping stage sometimes # fails when calculating sizeof during wrapping # Everything until then has usually worked, so we just # re-try wrapping to make the nightly binaries go through cd / source ./setup-env.sh export PATH=/home/sjm84/release-kits/bin/:$PATH # the star at the end does tab-completion cd /home/sjm84/snapshots/gs2-caveat/from* # store a copy of the original build log mv rk2.out rk2orig.out #rk2 create-installer rk2 wrap # concatenate current log to the original build log, overwriting any previous rk2.out # http://stackoverflow.com/questions/2150614/bash-shell-scripting-combining-txt-into-one-file mv rk2.out rk2wrap.out cat rk*.out > rk2.out rm rk2wrap.out rm rk2orig.out # upload the newly wrapped binary and the log cd /home/sjm84/envi/bin ./envi gs2-caveat upload # back to lsb root cd / fi