aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-09-18 05:18:17 -0400
committerB. Watson <urchlay@slackware.uk>2026-09-18 05:18:17 -0400
commitc8fc3fa101b2323033a83294e0a00a3e78fdd1da (patch)
tree95c6aec9e89b62ac363f58471bcbb56f8172a127
parent8e880469bf4c2eaab6a71f48e6320070b3ea66a4 (diff)
downloadsbostuff-c8fc3fa101b2323033a83294e0a00a3e78fdd1da.tar.gz
sbols: add -o (orphans) option.
-rwxr-xr-xadmin/sbols11
1 files changed, 10 insertions, 1 deletions
diff --git a/admin/sbols b/admin/sbols
index 9edbfab..d5bf613 100755
--- a/admin/sbols
+++ b/admin/sbols
@@ -27,6 +27,7 @@ Options:
-M <maintainer> Show all builds for given maintainer. If this
option is used, it must be the last option (this is done to
avoid the need to quote maintainer names with spaces in them).
+ -o Same as -M "orphaned - no maintainer"; lists orphans.
-m Show maintainer name and email.
-d Show description (from top of slack-desc).
-r Show REQUIRES.
@@ -47,9 +48,10 @@ if [ "$1" = "--help" -o "$1" = "" ]; then
usage ; exit 0
fi
-while getopts ":MmdraghA" OPT; do
+while getopts ":MomdraghA" OPT; do
case "$OPT" in
M) opt_M=1 ;;
+ o) opt_o=1 ;;
m) opt_m=1 ;;
d) opt_d=1 ;;
r) opt_r=1 ;;
@@ -65,6 +67,11 @@ shift $(($OPTIND - 1))
[ "$SBO_GITROOT" != "" ] && cd "$SBO_GITROOT"
[ -d .git -a -d system -a -d academic ] || die "not a valid SBo git checkout"
+if [ "$opt_o" = "1" ]; then
+ opt_M=1
+ set "orphaned - no maintainer"
+fi
+
if [ "$opt_M" = "1" ]; then
cdsb
builds="$( git grep -l "$*" '*/*/*.info' | cut -d/ -f1,2 )"
@@ -72,6 +79,8 @@ if [ "$opt_M" = "1" ]; then
set $builds
fi
+[ "$*" = "" ] && usage && exit 1
+
for i; do
if cdsb $i; then
i="$( basename $( pwd ) )"