Skip to content

Commit dd6f633

Browse files
authored
Windows archives have a different extension (#339)
1 parent 5d72d53 commit dd6f633

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: install.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,12 @@ downloadFile() {
104104
get TAG_JSON https://api.github.com/repos/arduino/arduino-cli/releases/latest
105105
TAG=$(echo $TAG_JSON | python -c 'import json,sys;obj=json.load(sys.stdin, strict=False);sys.stdout.write(obj["tag_name"])')
106106
echo "TAG=$TAG"
107-
# arduino-cli_0.4.0-rc1_Linux_64bit.tar.gz
108-
CLI_DIST="arduino-cli_${TAG}_${OS}_${ARCH}.tar.gz"
107+
# arduino-cli_0.4.0-rc1_Linux_64bit.[tar.gz, zip]
108+
if [ "$OS" == "Windows" ]; then
109+
CLI_DIST="arduino-cli_${TAG}_${OS}_${ARCH}.zip"
110+
else
111+
CLI_DIST="arduino-cli_${TAG}_${OS}_${ARCH}.tar.gz"
112+
fi
109113
echo "CLI_DIST=$CLI_DIST"
110114
DOWNLOAD_URL="https://downloads.arduino.cc/arduino-cli/$CLI_DIST"
111115
CLI_TMP_FILE="/tmp/$CLI_DIST"

0 commit comments

Comments
 (0)