Skip to content

Commit

Permalink
tidy up location of args
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Sep 20, 2023
1 parent c21f911 commit 3664fd9
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions build/root/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
# exit script if return code != 0
set -e

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

# target arch from buildx arg
TARGETARCH="${2}"

if [[ -z "${RELEASETAG}" ]]; then
echo "[warn] Release tag name from build arg is empty, exiting script..."
exit 1
fi

if [[ -z "${TARGETARCH}" ]]; then
echo "[warn] Target architecture name from build arg is empty, exiting script..."
exit 1
fi

# build scripts
####

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

# detect image arch
####

# get target arch from Dockerfile argument
TARGETARCH="${2}"

# pacman packages
####
Expand Down

0 comments on commit 3664fd9

Please sign in to comment.