From 70eb1e49680ae36f9dae76045d346b7df1344222 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 18 Sep 2026 06:50:23 -0400 Subject: sbols: no error if ~/sbostuff/sbostuff.sh missing (just use current dir). --- admin/sbols | 13 +++++++++---- 1 file 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 -- cgit v1.2.3