From 8c801ce0439881aac860a438c07b7658c25ec9ab Mon Sep 17 00:00:00 2001 From: Paul Brenner Date: Wed, 28 Jun 2023 16:42:11 +0900 Subject: [PATCH] Update install.sh for OSX (#17) --- scripts/install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index c8de0ae..6f39cd7 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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 @@ -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}"