[misc] 01/02: prebuilder: Add usage message (-h option).
Daniel Shahaf
danielsh at apache.org
Mon May 22 10:35:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
danielsh-guest pushed a commit to branch master
in repository misc.
commit 9c45486a659b71a87eadebff5c54a41aeb8087fa
Author: Daniel Shahaf <danielsh at apache.org>
Date: Mon May 22 10:33:55 2017 +0000
prebuilder: Add usage message (-h option).
---
prebuilder/rebuild.sh | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/prebuilder/rebuild.sh b/prebuilder/rebuild.sh
index 9131cf1..a85cc6a 100755
--- a/prebuilder/rebuild.sh
+++ b/prebuilder/rebuild.sh
@@ -2,6 +2,7 @@
SCRIPT_PATH="$(realpath $(which "$0"))"
SCRIPT_DIR="$(dirname $SCRIPT_PATH)"
+MYNAME=`basename -- "$0"`
[ -f "$SCRIPT_DIR/config" ] && . "$SCRIPT_DIR/config"
@@ -10,12 +11,26 @@ USE_COWBUILDER=
NUM_CPU="$(grep -c '^processor' /proc/cpuinfo)"
ARCH="$(dpkg --print-architecture)"
-while getopts b:c o; do
+usage() {
+ echo "$MYNAME: build a package twice with variations"
+ echo ""
+ echo "Synopsis:"
+ echo " $MYNAME [-b BASETGZ] [-c] [-h] PACKAGENAME"
+ echo ""
+ echo "Options:"
+ echo " -b BASETGZ Specify path to pbuilder's --basetgz."
+ echo " -c Use cowbuilder."
+ echo " -h Show this usage message."
+ echo " PACKAGENAME Name of a *.dsc source package file, up to the underscore."
+}
+
+while getopts b:ch o; do
case $o in
b ) BASEPATH="$OPTARG"
[ "${BASEPATH%.cow}" != "${BASEPATH}" ] && USE_COWBUILDER=true
;;
c ) USE_COWBUILDER=true;;
+ h ) usage; exit 0;;
esac
done
shift "$(expr $OPTIND - 1)"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list