Skip to content

Commit 9878c09

Browse files
committed
tidy up location of args
1 parent cba85f7 commit 9878c09

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

build/root/install.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@
33
# exit script if return code != 0
44
set -e
55

6-
# release tag name from build arg, stripped of build ver using string manipulation
6+
# release tag name from buildx arg, stripped of build ver using string manipulation
77
RELEASETAG="${1//-[0-9][0-9]/}"
88

9+
# target arch from buildx arg
10+
TARGETARCH="${2}"
11+
12+
if [[ -z "${RELEASETAG}" ]]; then
13+
echo "[warn] Release tag name from build arg is empty, exiting script..."
14+
exit 1
15+
fi
16+
17+
if [[ -z "${TARGETARCH}" ]]; then
18+
echo "[warn] Target architecture name from build arg is empty, exiting script..."
19+
exit 1
20+
fi
21+
922
# build scripts
1023
####
1124

@@ -18,11 +31,6 @@ unzip /tmp/scripts-master.zip -d /tmp
1831
# move shell scripts to /root
1932
mv /tmp/scripts-master/shell/arch/docker/*.sh /usr/local/bin/
2033

21-
# detect image arch
22-
####
23-
24-
# get target arch from Dockerfile argument
25-
TARGETARCH="${2}"
2634

2735
# pacman packages
2836
####

0 commit comments

Comments
 (0)