diff options
Diffstat (limited to 'admin/sbols')
| -rwxr-xr-x | admin/sbols | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/admin/sbols b/admin/sbols index d5bf613..9de8d56 100755 --- a/admin/sbols +++ b/admin/sbols @@ -16,7 +16,7 @@ usage() { cat <<EOF $SELF - query SBo git tree for info on builds -Usage: $SELF [-mdrghaA] [ -M <maintainer> | <build> [<build> ...] ] +Usage: $SELF [-onsdchaA] [ -m <maintainer> | <build> [<build> ...] ] Build arguments are build names as used with cdsb: category/build, or just build, and partial matches are supported. For each one, show the @@ -24,17 +24,17 @@ category/build (and optionally the maintainer, dependencies, and/or description). Output is one line per argument. Options: - -M <maintainer> Show all builds for given maintainer. If this + -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). + -o Same as -m "orphaned - no maintainer"; lists orphans. + -n Show maintainer name and email. + -s Show short description (from top of slack-desc). -r Show REQUIRES. - -g Show last git commit date/author/desciption (slow!). - -h Show dependees (requires hoorex). - -a Same as -mdr (show all info, except git and dependees). - -A Same as -mdrgh (show all info). + -c Show last git commit date/author/description (slow!). + -d Show dependees (requires hoorex). + -a Same as -nsr (show all info, except last commit and dependees). + -A Same as -nsrch (show all info). Environment: SBO_GITROOT - set this to the path of the local SBo git clone. @@ -48,17 +48,17 @@ if [ "$1" = "--help" -o "$1" = "" ]; then usage ; exit 0 fi -while getopts ":MomdraghA" OPT; do +while getopts ":monsracdA" OPT; do case "$OPT" in - M) opt_M=1 ;; - o) opt_o=1 ;; m) opt_m=1 ;; - d) opt_d=1 ;; + o) opt_o=1 ;; + n) opt_n=1 ;; + s) opt_s=1 ;; r) opt_r=1 ;; - a) opt_m=1 ; opt_d=1 ; opt_r=1 ;; - g) opt_g=1 ;; - h) opt_h=1 ;; - A) opt_m=1 ; opt_d=1 ; opt_r=1 ; opt_g=1 ; opt_h=1 ;; + a) opt_n=1 ; opt_s=1 ; opt_r=1 ;; + c) opt_c=1 ;; + d) opt_d=1 ;; + A) opt_n=1 ; opt_s=1 ; opt_r=1 ; opt_c=1 ; opt_d=1 ;; *) die "invalid option -$OPTARG, try --help" ;; esac done @@ -68,11 +68,11 @@ shift $(($OPTIND - 1)) [ -d .git -a -d system -a -d academic ] || die "not a valid SBo git checkout" if [ "$opt_o" = "1" ]; then - opt_M=1 + opt_m=1 set "orphaned - no maintainer" fi -if [ "$opt_M" = "1" ]; then +if [ "$opt_m" = "1" ]; then cdsb builds="$( git grep -l "$*" '*/*/*.info' | cut -d/ -f1,2 )" [ "$builds" = "" ] && die "maintainer '$*' not found" @@ -86,20 +86,20 @@ for i; do i="$( basename $( pwd ) )" prgcat="$( pwd | rev | cut -d/ -f1,2 | rev )" echo -n $prgcat - if [ "$opt_m" = "1" ]; then + if [ "$opt_n" = "1" ]; then source ./$i.info echo -n ": $MAINTAINER <$EMAIL>" fi - if [ "$opt_d" = "1" ]; then + if [ "$opt_s" = "1" ]; then echo -n " $( grep $i: slack-desc | head -1 | cut -d' ' -f3- )" fi if [ "$opt_r" = "1" ]; then echo -n " $( grep ^REQUIRES $i.info | grep -v '""' )" fi - if [ "$opt_g" = "1" ]; then + if [ "$opt_c" = "1" ]; then echo -n " $( git -P log -n1 --format="%as;%an;%s" . | sed "s,;$prgcat: ,;,")" fi - if [ "$opt_h" = "1" ]; then + if [ "$opt_d" = "1" ]; then x="$( hoorex -a $i | cut -d' ' -f2- )" [ "$x" != "" ] && echo -n " | $x" fi |
