We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2ec286 commit 81eff91Copy full SHA for 81eff91
build.sh
@@ -1,12 +1,42 @@
1
#!/usr/bin/env bash
2
-
3
set -e
4
5
-if [ -z "$1" ]; then
6
- echo "Usage: $0 {version}"
7
- echo "... where {version} is a 'x.y' version such as 8.0."
8
- exit
9
-fi
+die() {
+ echo >&2
+ echo >&2 "ERROR: $*"
+ exit 1
+}
10
+
11
+die_usage() {
12
+ usage >&2
13
+ die "$*"
14
15
16
+usage() {
17
+ cat <<EOF
18
+Usage: $0 <version>
19
+... where <version> is a 'x.y' version such as 8.0.
20
+EOF
21
22
23
+while [ $# -ge 1 ]; do
24
+ case "$1" in
25
+ --help|-h)
26
+ usage
27
+ exit 0
28
+ ;;
29
+ -*)
30
+ die_usage "unknown flag '$1'"
31
32
+ *)
33
+ break
34
35
+ esac
36
+ shift
37
+done
38
39
+[ -n "$1" ] || die_usage "version parameter missing"
40
41
RUNNER=""
42
if [ -n "$XCPNG_OCI_RUNNER" ]; then
0 commit comments