diff options
| -rwxr-xr-x | sbrun | 46 |
1 files changed, 30 insertions, 16 deletions
@@ -138,6 +138,12 @@ beginning with - must occur before [script] or [variable=value]. $SELF's sudo support: the file ends up owned by root, not the user you ran $SELF as. +-q Build & install dependencies, if they're not already installed. -q is + short for "queue", as this is a shortcut for: sbodeps | sbqrun - + +-Q Build & install all dependencies (even if they're already installed). + Shortcut for: sbodeps -i | sbqrun - + -h, --help Show short usage message and exit. @@ -344,6 +350,11 @@ die() { exit 1 } +# -q and -Q +run_queue() { + exec sbodeps $1 . | sbqrun - +} + ### main() # if these are in $PATH, 99.99% of all SBo builds will run @@ -372,6 +383,8 @@ while printf -- "$1" | grep -q ^-; do export CC CXX ;; -i) UPKG=yes ;; -d) SBODL=yes ;; + -q) run_queue ;; + -Q) run_queue -i ;; -h|-help|--help) show_help ; exit 0 ;; -H) long_help ; exit 0 ;; -*) show_help "$1"; exit 1 ;; @@ -445,21 +458,22 @@ trap signal_handler INT TERM if [ "$TRACK" = "yes" ]; then if ! /bin/which trackfs &>/dev/null; then warn "File tracking enabled, but trackfs not installed!" - die "Install system/trackfs or re-run $SELF with -t." - fi - - LOGDIR="$( mktemp -d /tmp/sbrun.XXXXXX )" - if [ -z "$LOGDIR" ] || [ ! -d "$LOGDIR" ]; then - die "Can't create temp log dir in /tmp, bailing" - fi - - LOG=$LOGDIR/log - - # Fun fact: trackfs uses GNU-style -- to mean "no more options", - # but it's undocumented in the man page and --help output. - # The readlink stuff is here in case $TMP or $OUTPUT has a symlink - # in its path: trackfs will log the real path, with the links resolved. - TRACKFS=\ + #die "Install system/trackfs or re-run $SELF with -t." + warn "Proceeding without trackfs." + TRACK=no + else + LOGDIR="$( mktemp -d /tmp/sbrun.XXXXXX )" + if [ -z "$LOGDIR" ] || [ ! -d "$LOGDIR" ]; then + die "Can't create temp log dir in /tmp, bailing" + fi + + LOG=$LOGDIR/log + + # Fun fact: trackfs uses GNU-style -- to mean "no more options", + # but it's undocumented in the man page and --help output. + # The readlink stuff is here in case $TMP or $OUTPUT has a symlink + # in its path: trackfs will log the real path, with the links resolved. + TRACKFS=\ "trackfs -l $LOG \ -I$( readlink -f "$TMP" )/\\* \ -I$( readlink -f "$OUTPUT")/\\* \ @@ -471,7 +485,7 @@ if [ "$TRACK" = "yes" ]; then -I/dev/pts/\\* \ -I/dev/shm/\\* \ --" - + fi fi if [ "$STRACE" != "" ]; then |
