aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2022-04-24 09:25:12 -0400
committerThien-Thi Nguyen <ttn@gnuvola.org>2022-04-24 09:25:12 -0400
commit38003129d44f31c4a197fd7871321655dcda7bc2 (patch)
tree14d0f660cdef68a35e7ec05498e85912c246cd7e
parentd2994cc9c61919459802f2b8d18597f2a251d8b0 (diff)
downloadgana-38003129d44f31c4a197fd7871321655dcda7bc2.tar.gz
gana-38003129d44f31c4a197fd7871321655dcda7bc2.zip
add check for required arg TEMPLATE
* format.sh (version): Bump to "1.2". <top-level>: Handle missing arg TEMPLATE.
-rwxr-xr-xformat.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/format.sh b/format.sh
index f48dda6..a268ef5 100755
--- a/format.sh
+++ b/format.sh
@@ -6,7 +6,8 @@
6## 6##
7me=$(basename $0) 7me=$(basename $0)
8 8
9version='1.1' 9version='1.2'
10# 1.2 -- add check for required arg TEMPLATE
10# 1.1 -- add --help/--version support 11# 1.1 -- add --help/--version support
11# 1.0 -- initial release 12# 1.0 -- initial release
12 13
@@ -20,6 +21,11 @@ if [ x"$1" = x--version ] ; then
20 exit 0 21 exit 0
21fi 22fi
22 23
24if [ x"$1" = x ] ; then
25 echo >&2 "$me: ERROR: missing arg TEMPLATE (try --help)"
26 exit 1
27fi
28
23template="$1" 29template="$1"
24 30
25exec recfmt -f "$template" 31exec recfmt -f "$template"