blob: 40da6a269137c62e5b52e9ca3c5dd5caf07ebde2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|