File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change 7
7
# - https://google.github.io/styleguide/shell.xml
8
8
#
9
9
10
+ show_help () {
11
+ printf " USAGE:\n\t%s\n" " talos-bootstrap ACTION [OPTIONS]"
12
+ printf " \nACTIONS:\n"
13
+ printf " \t%s\t\t%s\n" " help" " Show this help message."
14
+ printf " \t%s\t\t%s\n" " install" " Setup a node for a new or existing cluster."
15
+ printf " \t%s\t\t%s\n" " upgrade" " Upgrade a node in an existing cluster."
16
+ printf " \t%s\t\t%s\n" " reset" " Reset and remove a node from an existing cluster."
17
+ printf " \t%s\t\t%s\n" " reboot" " Reboot a node."
18
+ printf " \t%s\t%s\n" " shutdown" " Shutdown a node."
19
+ printf " \t%s\t%s\n" " dashboard" " Open dashboard for a node."
20
+ printf " \nOPTIONS:\n"
21
+ printf " \t%s <%s>\t%s\n" " -n, --node" " address" " Node address"
22
+ exit 1
23
+ }
24
+
10
25
node=
11
26
OP=
12
27
while [ $# -gt 0 ]; do
13
28
key=" $1 "
14
29
case $key in
30
+ -h|--help)
31
+ show_help
32
+ exit 0
33
+ ;;
15
34
-n | --node)
16
35
node=" $2 "
17
36
shift
@@ -41,18 +60,7 @@ case "$OP" in
41
60
OPTS=" --talosconfig=talosconfig"
42
61
;;
43
62
* )
44
- printf " USAGE:\n\t%s\n" " talos-bootstrap ACTION [OPTIONS]"
45
- printf " \nACTIONS:\n"
46
- printf " \t%s\t\t%s\n" " help" " Show this help message."
47
- printf " \t%s\t\t%s\n" " install" " Setup a node for a new or existing cluster."
48
- printf " \t%s\t\t%s\n" " upgrade" " Upgrade a node in an existing cluster."
49
- printf " \t%s\t\t%s\n" " reset" " Reset and remove a node from an existing cluster."
50
- printf " \t%s\t\t%s\n" " reboot" " Reboot a node."
51
- printf " \t%s\t%s\n" " shutdown" " Shutdown a node."
52
- printf " \t%s\t%s\n" " dashboard" " Open dashboard for a node."
53
- printf " \nOPTIONS:\n"
54
- printf " \t%s <%s>\t%s\n" " -n, --node" " address" " Node address"
55
- exit 1
63
+ show_help
56
64
;;
57
65
esac
58
66
You can’t perform that action at this time.
0 commit comments