aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Erdmann <dywi@mailerd.de>2014-07-18 17:36:52 +0200
committerAndré Erdmann <dywi@mailerd.de>2014-07-18 17:36:52 +0200
commit9fd99e101f586bf91f551b79e8296ca4a5c9ce41 (patch)
treed010f187bc46f68590983fa1420c40ecf6190394
parentbin/build/setver.sh: change suffix handling (diff)
downloadR_overlay-9fd99e101f586bf91f551b79e8296ca4a5c9ce41.tar.gz
R_overlay-9fd99e101f586bf91f551b79e8296ca4a5c9ce41.tar.bz2
R_overlay-9fd99e101f586bf91f551b79e8296ca4a5c9ce41.zip
bin/build/setver.sh: --help
-rwxr-xr-xbin/build/setver.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/build/setver.sh b/bin/build/setver.sh
index bf5bf67..221bb40 100755
--- a/bin/build/setver.sh
+++ b/bin/build/setver.sh
@@ -2,6 +2,8 @@
#
# Sets roverlay's version.
#
+print_help() {
+cat << EOF | sed -re 's,^[#]\s?,,'
# Usage: setver [-S,--src <dir>] [--pretend] [--suffix <str>] [--reset]
# [--git-add] [--git-commit] [--force-commit] [--git-tag]
# [+,pbump|++,mbump|Mbump|[setver] <ver>]
@@ -24,6 +26,8 @@
# --force-commit -- enforce git commit (allow other files)
# --git-tag -- run git-tag <newver> after git-commit
#
+EOF
+}
set -e
set -u
readonly IFS_DEFAULT="${IFS}"
@@ -194,6 +198,10 @@ while [ ${#} -gt 0 ]; do
echo "VERSION"
exit 0
;;
+ -h|--help)
+ print_help
+ exit 0
+ ;;
*)
die "unknown arg: ${1}" 64