aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorziggys <ziggys@autistici.org>2018-06-28 11:34:31 -0400
committerziggys <ziggys@autistici.org>2018-06-28 11:43:28 -0400
commit4a15ce53bc8b4984fbd8b8fbbae9c207f6e65d10 (patch)
tree8fc40ffa32023f46916b5826089845bdc352969c
parentd2a78490511ea01158f396899206004098ee54cc (diff)
downloadgc2gs-4a15ce53bc8b4984fbd8b8fbbae9c207f6e65d10.zip
gc2gs-4a15ce53bc8b4984fbd8b8fbbae9c207f6e65d10.tar
Usage
-rwxr-xr-xgc2gs.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/gc2gs.sh b/gc2gs.sh
index e5b3462..1d090c7 100755
--- a/gc2gs.sh
+++ b/gc2gs.sh
@@ -8,13 +8,13 @@
# scriptinfo
SCRIPTNAME="${0##*/}"
SCRIPTNAME="${SCRIPTNAME%%.sh}"
-VERSION="1.0.3" # Usage
+VERSION="1.0.4" # Usage
AUTHOR="ziggys"
LICENSE="The Drunken BEER License v 1.1 (https://git.p4g.club/git/beer/about)"
# usage
usage () {
-test $# = 0 || echo $@
+test $# = 0 || printf "%s %s\\n" "${SCRIPTNAME}" "$@"
cat << EOF | fold -s
${SCRIPTNAME} version ${VERSION}
by ${AUTHOR}
@@ -182,7 +182,7 @@ gs_post () {
}
# read options from commandline
-test "${#}" -lt 1 && show_help "${@}"
+test "${#}" -lt 1 && usage "${@}"
while getopts ":c:k:p:vh" opt; do
case "${opt}" in
c) CONFNAME="${OPTARG}" ; EXECUTE="config" ;;
@@ -191,7 +191,7 @@ while getopts ":c:k:p:vh" opt; do
\?) printf "Invalid: -%s" "${OPTARG}" 1>&2 ; exit 3 ;;
:) printf "Invalid: -%s requires an argument" "${OPTARG}" 1>&2 ; exit 3 ;;
v) VERBOSE="notnull" ;;
- h) show_help "${@}";;
+ h) usage "${@}";;
esac
done
shift $((OPTIND -1))
@@ -204,7 +204,7 @@ TSTATUS="$(mktemp -p "${TMPDIR}")"
VOUTPUT="$(mktemp -p "${TMPDIR}")"
# configure variables
-test -z "${CONFNAME}" && show_help "${@}"
+test -z "${CONFNAME}" && usage "${@}"
XDGCONF="${XDG_HOME_CONFIG:=${HOME}/.config}"
CONFIGDIR="${XDGCONF}/gc2gs"
RCFILE="${CONFIGDIR}/${CONFNAME}.config"