diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-04 13:49:01 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-04 13:49:01 +0100 |
commit | 7a9427748e17db29fb1bd4d2703d0d964f64f379 (patch) | |
tree | b8c2c82c44e3a61b2b7c42a90aa1c6a7cb255a32 /tools/update_man_pages.sh | |
parent | af1f5829a2b8181fc005acdafaa4cc52e5ae320b (diff) | |
download | sbotools2-7a9427748e17db29fb1bd4d2703d0d964f64f379.tar.xz |
Update version handling in tools/
Diffstat (limited to 'tools/update_man_pages.sh')
-rwxr-xr-x | tools/update_man_pages.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/update_man_pages.sh b/tools/update_man_pages.sh index fe96125..960e151 100755 --- a/tools/update_man_pages.sh +++ b/tools/update_man_pages.sh @@ -1,11 +1,15 @@ #!/bin/sh usage_exit() { - echo "Usage: $(basename $0) (-d) (-g) version" + echo "Usage: $(basename $0) (-d) (-g)" exit 1 } -if [[ "$1" == "" ]]; then +if [[ "$1" == "-h" ]]; then + usage_exit +fi + +if [[ "$1" == "-?" ]]; then usage_exit fi @@ -19,11 +23,7 @@ if [[ "$1" == "-g" ]]; then shift fi -if [[ "$1" == "" ]]; then - usage_exit -fi - -version="$1" +VERSION=$(grep '^our $VERSION' SBO-Lib/lib/SBO/Lib.pm | grep -Eo '[0-9]+(\.[0-9RC]+){0,1}') if ! [[ -d "./man1" ]]; then echo "you do not seem to be at the right place to run this." |