diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-09-18 06:50:23 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-09-18 06:50:23 -0400 |
| commit | 70eb1e49680ae36f9dae76045d346b7df1344222 (patch) | |
| tree | 2547a09a114057311ba3d784a48ae1265a7f00e4 | |
| parent | 0a3f365cb319ebe879beca53af064fd670898550 (diff) | |
| download | sbostuff-70eb1e49680ae36f9dae76045d346b7df1344222.tar.gz | |
sbols: no error if ~/sbostuff/sbostuff.sh missing (just use current dir).
| -rwxr-xr-x | admin/sbols | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/admin/sbols b/admin/sbols index a443edd..e762d63 100755 --- a/admin/sbols +++ b/admin/sbols @@ -32,18 +32,19 @@ Options: -s Show short description (from top of slack-desc). -r Show REQUIRES. -c Show last git commit date/author/description (slow!). - -d Show dependees (requires hoorex). - -l Same as -nsr (show "long" info, except last commit and dependees). + -d Show dependees (requires hoorex on \$PATH). + -l Same as -nsr (show "long" info, no last commit or dependees). -a Same as -nsrcd (show all info). Environment: SBO_GITROOT - set this to the path of the local SBo git clone. If not set, the current directory is assumed. + +Exit status is 0 (success) if any builds were listed, or 1 (failure) +if no builds were listed at all. EOF } -source ~/sbostuff/sbostuff.sh - if [ "$1" = "--help" -o "$1" = "" ]; then usage ; exit 0 fi @@ -64,7 +65,11 @@ while getopts ":monsrcdla" OPT; do done shift $(($OPTIND - 1)) +# if we have this, use it, otherwise use current dir. +source ~/sbostuff/sbostuff.sh 2>/dev/null [ "$SBO_GITROOT" != "" ] && cd "$SBO_GITROOT" + +# either way, check that it's for real. [ -d .git -a -d system -a -d academic ] || die "not a valid SBo git checkout" if [ "$opt_o" = "1" ]; then |
