aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorziggys <ziggys@autistici.org>2018-06-27 21:54:21 -0400
committerziggys <ziggys@autistici.org>2018-06-27 21:54:21 -0400
commitd2a78490511ea01158f396899206004098ee54cc (patch)
tree1a15a993e4066dc2156cd8aaefbd89216d1c8117
parente0de69d3758c948a8d2bb4017be9c97c08d029db (diff)
downloadgc2gs-d2a78490511ea01158f396899206004098ee54cc.tar
gc2gs-d2a78490511ea01158f396899206004098ee54cc.zip
Usage
-rwxr-xr-xgc2gs.sh56
1 files changed, 29 insertions, 27 deletions
diff --git a/gc2gs.sh b/gc2gs.sh
index 7e79ff0..e5b3462 100755
--- a/gc2gs.sh
+++ b/gc2gs.sh
@@ -8,36 +8,38 @@
# scriptinfo
SCRIPTNAME="${0##*/}"
SCRIPTNAME="${SCRIPTNAME%%.sh}"
-VERSION="1.0.2" # Add some basic tests
+VERSION="1.0.3" # Usage
AUTHOR="ziggys"
LICENSE="The Drunken BEER License v 1.1 (https://git.p4g.club/git/beer/about)"
-# show help
-show_help () {
-test "${#}" = 0 || echo "${@}"
-echo "${SCRIPTNAME} version ${VERSION}"
-echo " by ${AUTHOR}"
-echo " License: ${LICENSE}"
-echo
-echo "${SCRIPTNAME} is a shellscript that posts a status message to a"
-echo " gnu-social node with the last commit information of a git-project"
-echo
-echo "Usage: ${0} [OPTIONS] <args> ..."
-echo "Usage: ${0} [-[ckp]vh] projectname"
-echo
-echo "Options"
-echo " -c <projectname> Create a configuration file for 'projectname'"
-echo " -k <projectname> Create a 'pre-push' 'git hook' for 'projectname'"
-echo " -p <projectname> Post a status message with 'projectname'"
-echo " last commit information. Usefull when running"
-echo " the script manually"
-echo " -v VERBOSE Increase verbosity"
-echo " -h HELP Print this help and exit"
-echo
-echo "For more details about this script go to"
-echo "Official Repository: https://git.p4g.club/git/gc2gs"
-echo "Mirror Repository: https://gitgud.io/ziggys/gc2gs"
-exit "${?}"
+# usage
+usage () {
+test $# = 0 || echo $@
+cat << EOF | fold -s
+${SCRIPTNAME} version ${VERSION}
+ by ${AUTHOR}
+ License: ${LICENSE}
+
+${SCRIPTNAME} is a shellscript that posts a status message to a gnu-social
+ node with the last commit information of a git-project
+
+Usage: ${0} [OPTIONS] <args> ...
+Usage: ${0} [-[ckp]vh] projectname
+
+Options
+ -c <projectname> Create a configuration file for 'projectname'
+ -k <projectname> Create a 'pre-push' 'git hook' for 'projectname'
+ -p <projectname> Post a status message with 'projectname'
+ last commit information. Usefull when running
+ the script manually
+ -v VERBOSE Increase verbosity
+ -h HELP Print this help and exit
+
+For more details about this script go to
+Official Repository: https://git.p4g.club/git/gc2gs
+Mirror Repository: https://gitgud.io/ziggys/gc2gs
+EOF
+exit 0
}
# configure new project.config