summaryrefslogtreecommitdiffstats
path: root/server/lib/ogfunctions.sh
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2020-02-17 11:28:31 +0100
committerRamón M. Gómez <ramongomez@us.es>2020-02-17 11:28:31 +0100
commitca75d294e3b1bd59ca868c6a57310445eb1187dd (patch)
tree8e98269864d7e02e6dee0302da765c69609a604f /server/lib/ogfunctions.sh
parentcae6338c4f3c0045f17e9f15dd38786d97ab496d (diff)
#957: Script `supportsave` uses global functions to show help and manage errors.
Diffstat (limited to 'server/lib/ogfunctions.sh')
-rwxr-xr-xserver/lib/ogfunctions.sh1
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"}"