diff options
author | B. Watson <yalhcru@gmail.com> | 2021-03-08 18:00:20 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2021-03-08 18:00:20 -0500 |
commit | 38e5312dc2daa78f1efbdecbc1e0737e6405e01f (patch) | |
tree | 95c80d03076d84b3e6f6c6e390b92e983a0bffe1 | |
parent | 9d40699c0982cbd36ee9cb6e71db2dc6e483a05f (diff) | |
download | sbostuff-38e5312dc2daa78f1efbdecbc1e0737e6405e01f.tar.gz |
sbrun: add -u (upkg) option to save typing
-rwxr-xr-x | sbrun | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -127,6 +127,10 @@ beginning with - must occur before [script] or [variable=value]. environment, or in one of distcc's config files. This option sets CC and CXX, allows network access, and disables filesystem tracking. +-u Install the package after building it. This just runs "upkg" in the + SlackBuild directory, so "sbrun -u" is just a shortcut for typing + "sbrun; upkg". + -h, --help Show short usage message and exit. @@ -247,6 +251,7 @@ Usage: $SELF [-option [-option ...]] [script] [variable=value ...] -c Clean up (remove) source and package dirs after build completes. -i Run an interactive shell in the source directory. -p Run an interactive shell in the \$PKG directory. +-u Install built package with 'upkg'. -h, --help Show short usage message (you're reading it now) and exit. -H Show long help message and exit. @@ -356,6 +361,7 @@ while printf -- "$1" | grep -q ^-; do TRACK=no NETWORK=yes export CC CXX ;; + -u) UPKG=yes ;; -h|-help|--help) show_help ; exit 0 ;; -H) long_help ; exit 0 ;; -*) show_help "$1"; exit 1 ;; @@ -546,5 +552,8 @@ fi cleanup_build +# Install the package if -u. +[ "$RET" = "0" ] && [ "$UPKG" = "yes" ] && upkg + # Our return status is that of the SlackBuild. exit $RET |