X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=lib%2Fbtr%2Fbtr.sh;h=96376efcfeba08ac79bf41d50d4a6ef8f925727a;hb=55181f92726b4306007e3bac012bbeff71ca4944;hp=75bb7cde9f73c5c9437bdb2a9519e098c0428483;hpb=14b604bea2501022d3d828f746a6fa2b2055a00a;p=m6w6%2Fbtr diff --git a/lib/btr/btr.sh b/lib/btr/btr.sh index 75bb7cd..96376ef 100755 --- a/lib/btr/btr.sh +++ b/lib/btr/btr.sh @@ -5,22 +5,24 @@ function help { echo echo "Usage: $(basename $0) [-hv] [] " echo - echo " -h, --help Display this help" - echo " -v, --verbose Be more verbose" + echo " -h, --help Display this help" + echo " -v, --verbose Be more verbose" echo echo " Options:" - echo " -s, --source= Use the specified source ruleset" - echo " -b, --build= Use the specified build ruleset" - echo " -r, --report= Use the specifued report ruleset" - echo " -B, --branch= Checkout this branch" - echo " -D, --directory= Use this directory as work root" - echo " -S, --suffix= Append suffix to the build name" - echo " -C, --configure= Define \$CONFIGURE options" + echo " -s, --source= Use the specified source ruleset" + echo " -b, --build= Use the specified build ruleset" + echo " -r, --report= Use the specifued report ruleset" + echo " -B, --branch= Checkout this branch" + echo " -D, --directory= Use this directory as work root" + echo " -S, --suffix= Append suffix to the build name" + echo " -C, --configure= Define \$CONFIGURE options" echo echo " Rulesets:" - echo " source: git, svn" - echo " build: php, pecl" - echo " report: mail" + for ruleset in source build report + do + printf " %10s: %s\n" $ruleset \ + "$(find "$LIBDIR/$ruleset" -name '*.mk' -exec basename {} .mk \; | sort | xargs)" + done echo exit } @@ -82,7 +84,7 @@ function parseopts { ;; -b|--build) case "$2" in - php|pecl) + *) BUILD_RULES="$2" ;; esac @@ -90,7 +92,7 @@ function parseopts { ;; -r|--report) case "$2" in - mail) + *) REPORT_RULES="$2" ;; esac @@ -142,7 +144,7 @@ function setup { export CONFIG_REPORT="btr+config-$BUILD-$DATE" export BUILD_REPORT="btr+build-$BUILD-$DATE" export TEST_REPORT="btr+tests-$BUILD-$DATE" - export LAST_REPORT=$(basename $(ls -t "$BTRDIR/btr+tests-$BUILD"* | tail -n1)) + export LAST_REPORT=$(basename $(ls -t "$BTRDIR/btr+tests-$BUILD"* 2>/dev/null | tail -n1) 2>/dev/null) export REPORT="" } @@ -181,4 +183,4 @@ function confirm { esac } -# vim: set noet +# vim: noet