# HG changeset patch # User Rob Landley # Date 1246561945 18000 # Node ID 37c083cca81049f49b39e6626a8e95f55a492df4 # Parent f43389fc24525abb46aa5a0c8e5ddf0cb182d9f2 Move doforklog to sources/functions.sh. diff -r f43389fc2452 -r 37c083cca810 buildall.sh --- a/buildall.sh Thu Jul 02 00:54:08 2009 -0500 +++ b/buildall.sh Thu Jul 02 14:12:25 2009 -0500 @@ -14,20 +14,6 @@ DO_SKIP_STAGE_TARBALLS="$SKIP_STAGE_TARBALLS" [ ! -z "$CROSS_COMPILERS_EH" ] && DO_SKIP_STAGE_TARBALLS=1 -# Run command in the background or foreground, depending on $FORK - -doforklog() -{ - [ -z "$LOG" ] && LOG=/dev/null - - if [ ! -z "$FORK" ] - then - $* 2>&1 | tee "$LOG" | grep '^===' & - else - $* 2>&1 | tee "$LOG" - fi -} - # Perform initial setup that doesn't parallelize well: Download source, # build host tools, extract source. diff -r f43389fc2452 -r 37c083cca810 sources/functions.sh --- a/sources/functions.sh Thu Jul 02 00:54:08 2009 -0500 +++ b/sources/functions.sh Thu Jul 02 14:12:25 2009 -0500 @@ -552,3 +552,19 @@ link_arch_name $1-{$ARCH,$ARCH_NAME}.tar.bz2 fi } + +# Run a command either in foreground or background, depending on $FORK +# Log to the file $LOG + +doforklog() +{ + [ -z "$LOG" ] && LOG=/dev/null + + if [ ! -z "$FORK" ] + then + $* 2>&1 | tee "$LOG" | grep '^===' & + else + $* 2>&1 | tee "$LOG" + fi +} +