-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxlt
executable file
·76 lines (60 loc) · 1.78 KB
/
xlt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env bash
# XLTech
# see xlt -h for info/help
# Constants
readonly XLTAPPNAME="xltech"
readonly XLTAPPCMD="xlt"
readonly XLTAPPDESC="XLTech front-end script to XLTech provided tools, applications & utilities in /opt/xltech"
readonly XLTAPPVER="1.0"
readonly XLTAPPREQPKGS=""
readonly XLTAPPAUTH="Matthew@XLTech.io (Astro7467)"
readonly XLTBUGREPORT="https://github.com/xltechasia/xltech/issues"
readonly TRUE=0
readonly FALSE=1
# end / Constants
# Initialize / Defaults
VERBOSE=0
# end / Initialize
show_help() {
cat << EOF
NAME
$XLTAPPNAME v$XLTAPPVER - $XLTAPPDESC
SYNOPSIS
$XLTAPPCMD [-h|--help] <options>
DESCRIPTION
Front-end script to XLTech central and common access to scripts in /opt/xltech
Enables access to multiple utilities through a single command ($XLTAPPCMD) linked in /usr/local/bin
OPTIONS
-h|--help Display this help
AUTHOR
$XLTAPPAUTH
REPORTING BUGS
$APPBUGREPORT
COPYRIGHT
Copyright © 2016 XLTech License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
EOF
} # show_help()
# main()
printf "\n%s v%s\n" "$XLTAPPCMD" "$XLTAPPVER"
while :; do
case $1 in
-h|-\?|--help) # Call a "show_help" function to display a synopsis, then exit.
show_help
exit 0
;;
--) # End of all options.
shift
break
;;
-?*) # Undefined options
printf '\nERROR: Unknown option : %s\n' "$1" >&2
exit 1
;;
*) # Default case: If no more options then break out of the loop.
break
esac
done
exit 0
# end / main()