From 7034aa1288dd0b79e6971eca5c42278bbab92deb Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 24 Sep 2026 06:52:13 -0400 Subject: sbrun: improve option parsing (use getopts bash builtin). --- sbrun | 70 ++++++++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/sbrun b/sbrun index 3b5b8c7..0175834 100755 --- a/sbrun +++ b/sbrun @@ -78,13 +78,13 @@ sudo. If you hate sudo, just run $SELF as root. $SELF is designed for use with SBo scripts, but will work for any SlackBuild (it doesn't refer to the SBo .info file). -$SELF written by B. Watson (yalhcru@gmail.com) and released +$SELF written by B. Watson (urchlay@slackware.uk) and released under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. -Usage: $SELF [-jN] [-n] [script] [variable=value ...] +Usage: $SELF [-option [-option ...]] [script] [variable=value ...] -Options may not be bundled (use -t -n, not -tn or -nt). All options -beginning with - must occur before [script] or [variable=value]. +Options may be bundled (-tn is the same as -t -n), and mixed +freely with non-option arguments. -l Lint the package after it's built, with sbopkglint(1). @@ -156,10 +156,10 @@ beginning with - must occur before [script] or [variable=value]. Leave off the -j1 to use the default number of jobs. After the SlackBuild exits, any files written to outside of \$TMP, -\$OUTPUT, /tmp, /var/tmp, or /root/.ccache (collectively referred to -as "the sandbox") are logged to stdout. Any write outside the -sandbox means a bug in the SlackBuild and should be reported to its -maintainer. +\$OUTPUT, /tmp, /var/tmp, /root/.ccachem, or /root/.cache +(collectively referred to as "the sandbox") are logged to stdout. Any +write outside the sandbox means a bug in the SlackBuild and should be +reported to its maintainer. The exit status of $SELF is the exit status of the SlackBuild, unless the -l option is used. With -l, the exit status is that @@ -247,23 +247,25 @@ show_help() { cat <