Mercurial > hg > aboriginal
diff sources/more/record-commands.sh @ 899:726cac165450
Remove old RECORD_COMMANDS debris from host-tools.sh and simplify result (lots of white-noise from de-intenting the "else" case of an if/else), factor out wrap_path from sources/more/record-commands.sh, fix the "build host tools first, then wrap it afterwards" case.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 23 Nov 2009 21:58:49 -0600 |
parents | 850da666acc6 |
children | 5ffc758bf60a |
line wrap: on
line diff
--- a/sources/more/record-commands.sh Sun Nov 22 03:56:04 2009 -0600 +++ b/sources/more/record-commands.sh Mon Nov 23 21:58:49 2009 -0600 @@ -10,23 +10,17 @@ echo "=== Setting up command recording wrapper" -PATH="$OLDPATH" +echo OLDPATH=$OLDPATH +echo PATH=$PATH + +[ -f "$WRAPDIR/wrappy" ] && PATH="$OLDPATH" +[ -f "$HOSTTOOLS/busybox" ] && PATH="$HOSTTOOLS" blank_tempdir "$WRAPDIR" blank_tempdir "$BUILD/logs" # Populate a directory of symlinks with every command in the $PATH. -# For each each $PATH element, loop through each file in that directory, -# and create a symlink to the wrapper with that name. In the case of -# duplicates, keep the first one. - -echo "$PATH" | sed 's/:/\n/g' | while read i -do - ls -1 "$i" | while read j - do - ln -s wrappy "$WRAPDIR/$j" 2>/dev/null - done -done +wrap_path "$PATH" "$WRAPDIR" wrappy | dotprogress # Build the wrapper $CC -Os "$SOURCES/toys/wrappy.c" -o "$WRAPDIR/wrappy" || dienow