File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 3
3
set -eu
4
4
set -o pipefail
5
5
6
+ function show_usage() {
7
+ echo " Refresh RHCOS image on cloud"
8
+ echo " "
9
+ echo " $0 [-h] [-b <BRANCH>]"
10
+ echo " "
11
+ echo " Options:"
12
+ echo " -b <BRANCH> The branch name. Example: 4.18"
13
+ echo " -h Show this help text."
14
+ exit 0
15
+ }
16
+
6
17
if [ -z " $OS_CLOUD " ]; then
7
18
echo ' Set your OS_CLOUD environment variable'
8
19
exit 1
9
20
fi
10
21
11
22
BRANCH=" 4.2"
12
23
13
- opts=$( getopt -n " $0 " -o " b:" --long ' branch:' -- " $@ " )
24
+ opts=$( getopt -n " $0 " -o " b:h " --long ' branch:,help ' -- " $@ " )
14
25
15
26
eval set " --$opts "
16
27
@@ -19,11 +30,13 @@ mkdir -p "$CACHE_DIR"
19
30
20
31
while [[ $# -gt 0 ]]; do
21
32
case " $1 " in
33
+ -h|--help)
34
+ show_usage
35
+ ;;
22
36
-b|--branch)
23
37
BRANCH=$2
24
38
shift 2
25
39
;;
26
-
27
40
* )
28
41
break
29
42
;;
You can’t perform that action at this time.
0 commit comments