From 7a9427748e17db29fb1bd4d2703d0d964f64f379 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 4 Dec 2015 13:49:01 +0100 Subject: Update version handling in tools/ --- tools/update_man_pages.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools/update_man_pages.sh') 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." -- cgit v1.2.3