diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2020-02-17 11:28:31 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2020-02-17 11:28:31 +0100 |
commit | ca75d294e3b1bd59ca868c6a57310445eb1187dd (patch) | |
tree | 8e98269864d7e02e6dee0302da765c69609a604f /server/lib/ogfunctions.sh | |
parent | cae6338c4f3c0045f17e9f15dd38786d97ab496d (diff) |
#957: Script `supportsave` uses global functions to show help and manage errors.
Diffstat (limited to 'server/lib/ogfunctions.sh')
-rwxr-xr-x | server/lib/ogfunctions.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/lib/ogfunctions.sh b/server/lib/ogfunctions.sh index 413a700c..f1b9e555 100755 --- a/server/lib/ogfunctions.sh +++ b/server/lib/ogfunctions.sh @@ -43,6 +43,7 @@ function help() { USAGE=$(grep "^#@usage" "$0" | cut -f2- -d" ") [ -n "$USAGE" ] && PARAMS=$(awk '$1=="#@param" {sub($1,""); print "\t",$0}' "$0") fi + [ "$PROG" ] || PROG="$(basename "$0")" # Showing help. echo "$PROG: ${DESCRIPTION:-"no description"}" echo "Usage: ${USAGE:-"no usage info"}" |