Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- TARS=/home/brad/load/tars
- DEST=/tmp/gcc
- LOOPCOUNT=0
- do_build () {
- mkdir -p $DEST/work/$1 || exit 1
- echo -n " "$1
- pushd $1-* > /dev/null || exit 1
- ./configure --prefix=$DEST/work/$1 --with-gmp=$DEST/work/gmp --with-mpfr=$DEST/work/mpfr --with-mpc=$DEST/work/mpc --disable-multilib &> configure.log || exit 1
- make -j16 > $DEST/work/$1/build.log 2>&1 ; RETVAL=$?
- if [ "$RETVAL" -ne 0 ] ; then
- cp $DEST/work/$1/build.log /tmp/$1-build-fail-`/bin/date +%s`.log
- elif [ "$1" != "gcc" ] ; then
- make install >> $DEST/work/$1/build.log 2>&1 ; RETVAL=$?
- fi;
- popd > /dev/null
- }
- while true ; do
- while true ; do
- rm -rf $DEST || exit 1
- mkdir -p $DEST/work || exit 1
- cd $DEST || exit 1
- echo loop started at `/bin/date +"%Y-%m-%d %H:%M:%S"`
- ORIGINTS=`/bin/date +%s`
- echo -n Untarring
- for i in $TARS/* ; do
- echo -n " "`basename $i`
- tar -xf $i
- done;
- echo
- echo Building ...
- LOOPCOUNT=$((LOOPCOUNT+1))
- for i in gmp mpfr mpc gcc ; do
- do_build $i ; [ "$RETVAL" -eq 0 ] || break
- done;
- [ "$RETVAL" -eq 0 ] || break
- echo " -- PASS "$LOOPCOUNT took $((`/bin/date +%s`-ORIGINTS))
- echo -n . >> /tmp/result
- done;
- echo -n f >> /tmp/result
- echo " -- FAIL "$LOOPCOUNT took $((`/bin/date +%s`-ORIGINTS))
- done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement