aboutsummaryrefslogtreecommitdiff
path: root/admin/orphanize
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-08-29 20:06:44 -0400
committerB. Watson <urchlay@slackware.uk>2026-08-29 20:06:44 -0400
commit55504fefce3078ac683b85508fa8af9e4d1b2059 (patch)
treee5590710b084f84520cfcce5f421403ea5a54132 /admin/orphanize
parent8a78cfe513eb112585a5c5660fcbeb7cb3c58719 (diff)
downloadsbostuff-55504fefce3078ac683b85508fa8af9e4d1b2059.tar.gz
admin/*: added.
Diffstat (limited to 'admin/orphanize')
-rwxr-xr-xadmin/orphanize34
1 files changed, 34 insertions, 0 deletions
diff --git a/admin/orphanize b/admin/orphanize
new file mode 100755
index 0000000..40da6a2
--- /dev/null
+++ b/admin/orphanize
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+source ~/sbostuff/sbostuff.sh
+export SBOLINT=no
+
+usage() {
+ cat <<EOF
+Usage:
+orphanize <build> [<build> ...]
+orphanize -m <maintainer>
+EOF
+}
+
+
+orphanize_builds() {
+ local b
+ for b in "$@"; do
+ cdsb "$b" && sbonewmaint nobody && git commit -a -m'Orphaned (unmaintained).'
+ done
+}
+
+orphanize_maint() {
+ local i
+ cdsb
+ for i in $( git grep "^MAINTAINER=\"$@\"" '*/*/*.info' | cut -d/ -f1,2 ); do
+ orphanize_builds "$i"
+ done
+}
+
+case "$1" in
+ "-m") shift; orphanize_maint "$@" ;;
+ ""|"-") usage ;;
+ *) orphanize_builds "$@" ;;
+esac