Skip to content

Commit

Permalink
Update install.sh for OSX (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-brenner committed Jun 28, 2023
1 parent d93fdae commit 8c801ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function get_zmk-viewer() {
DIST="linux-arm64"
fi
elif [ "${KERNEL}" == "Darwin" ]; then
EXT="zip"
EXT="tar.gz"
if [ "${MACHINE}" == "x86_64" ]; then
DIST="darwin-amd64"
elif [ "${MACHINE}" == "arm64" ]; then
Expand Down Expand Up @@ -74,7 +74,11 @@ function get_zmk-viewer() {
FILENAME="zmk-viewer-${VER}-${DIST}.${EXT}"

echo " - Downloading ${URL}/${FILENAME}"
TMP_DIR=$(mktemp --directory)
if [ "${KERNEL}" == "Darwin" ]; then
TMP_DIR=$(mktemp -d)
else
TMP_DIR=$(mktemp --directory)
fi
curl -sLo "${TMP_DIR}/${FILENAME}" "${URL}/${FILENAME}"

echo " - Unpacking ${FILENAME}"
Expand Down

0 comments on commit 8c801ce

Please sign in to comment.