diff options
Diffstat (limited to 'admin/orphanize')
| -rwxr-xr-x | admin/orphanize | 34 |
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 |
