From 38e5312dc2daa78f1efbdecbc1e0737e6405e01f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 8 Mar 2021 18:00:20 -0500 Subject: sbrun: add -u (upkg) option to save typing --- sbrun | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sbrun b/sbrun index ec4c6fe..1772c9e 100755 --- a/sbrun +++ b/sbrun @@ -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 -- cgit v1.2.3