diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2022-04-24 09:25:12 -0400 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2022-04-24 09:25:12 -0400 |
commit | 38003129d44f31c4a197fd7871321655dcda7bc2 (patch) | |
tree | 14d0f660cdef68a35e7ec05498e85912c246cd7e | |
parent | d2994cc9c61919459802f2b8d18597f2a251d8b0 (diff) | |
download | gana-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-x | format.sh | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -6,7 +6,8 @@ | |||
6 | ## | 6 | ## |
7 | me=$(basename $0) | 7 | me=$(basename $0) |
8 | 8 | ||
9 | version='1.1' | 9 | version='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 |
21 | fi | 22 | fi |
22 | 23 | ||
24 | if [ x"$1" = x ] ; then | ||
25 | echo >&2 "$me: ERROR: missing arg TEMPLATE (try --help)" | ||
26 | exit 1 | ||
27 | fi | ||
28 | |||
23 | template="$1" | 29 | template="$1" |
24 | 30 | ||
25 | exec recfmt -f "$template" | 31 | exec recfmt -f "$template" |