diff options
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/sbols | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/admin/sbols b/admin/sbols index a265757..c65406e 100755 --- a/admin/sbols +++ b/admin/sbols @@ -28,6 +28,10 @@ Options: 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. + -i <file> Read list of builds from <file> (use - for stdin). + Builds are separated by whitespace (including newlines), so + they can be one per line or multiple per line. Cannot be + used with -m <maintainer> option. -n Show maintainer name and email. -s Show short description (from top of slack-desc). -r Show REQUIRES. @@ -49,11 +53,12 @@ if [ "$1" = "--help" -o "$1" = "" ]; then usage ; exit 0 fi -while getopts ":monsrcdla" OPT; do +while getopts ":moi:nsrcdla" OPT; do case "$OPT" in m) opt_m=1 ;; o) opt_o=1 ;; n) opt_n=1 ;; + i) opt_i="$OPTARG" ;; s) opt_s=1 ;; r) opt_r=1 ;; c) opt_c=1 ;; @@ -65,8 +70,13 @@ while getopts ":monsrcdla" OPT; do done shift $(($OPTIND - 1)) +# sbostuff.sh defines cdsb(), which we can't do without. source ~/sbostuff/sbostuff.sh || exit 1 +# we're going to cd to $SBO_GITROOT, so canonicalize the -i file +# if one was given. +[ "$opt_i" != "" -a "$opt_i" != "-" ] && opt_i="$( realpath "$opt_i" )" + # if we have this, use it, otherwise use current dir. [ "$SBO_GITROOT" != "" ] && cd "$SBO_GITROOT" @@ -83,6 +93,10 @@ if [ "$opt_m" = "1" ]; then builds="$( git grep -l "$*" '*/*/*.info' | cut -d/ -f1,2 )" [ "$builds" = "" ] && die "maintainer '$*' not found" set $builds +elif [ "$opt_i" != "" ]; then + builds="$( cat "$opt_i" )" + [ "$builds" = "" ] && die "can't read any build names from $opt_i" + set $builds fi [ "$*" = "" ] && usage && exit 1 |
