aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorziggys <ziggys@autistici.org>2018-06-11 20:35:57 -0400
committerziggys <ziggys@autistici.org>2018-06-11 20:35:57 -0400
commit8585bef67b49cc42a4068b9b91b137b1a80c244d (patch)
treebf1a0b830dc9b134596eaff6bfe12efd4e02a3d9
parente718d4f6a8109a6fd693fefba61254192755cd8f (diff)
downloadgc2gs-8585bef67b49cc42a4068b9b91b137b1a80c244d.tar
gc2gs-8585bef67b49cc42a4068b9b91b137b1a80c244d.zip
Fix syntax
-rwxr-xr-xgc2gs.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc2gs.sh b/gc2gs.sh
index 0f0de70..3edf696 100755
--- a/gc2gs.sh
+++ b/gc2gs.sh
@@ -180,9 +180,9 @@ gs_post () {
}
# read options from commandline
-test "$#" -lt 1 && show_help
+test "${#}" -lt 1 && show_help "${@}"
while getopts ":c:k:p:vh" opt; do
- case ${opt} in
+ case "${opt}" in
c) CONFNAME="${OPTARG}" ; EXECUTE="config" ;;
k) CONFNAME="${OPTARG}" ; EXECUTE="hook" ;;
p) CONFNAME="${OPTARG}" ; EXECUTE="post" ;;
@@ -202,7 +202,7 @@ TSTATUS="$(mktemp -p "${TMPDIR}")"
VOUTPUT="$(mktemp -p "${TMPDIR}")"
# configure variables
-test -z "${CONFNAME}" && show_help
+test -z "${CONFNAME}" && show_help "${@}"
XDGCONF="${XDG_HOME_CONFIG:=${HOME}/.config}"
CONFIGDIR="${XDGCONF}/gc2gs"
RCFILE="${CONFIGDIR}/${CONFNAME}.config"