From cfd9a4d546ebb44f124eb87f86596a614828e2c6 Mon Sep 17 00:00:00 2001 From: Itoh Shimon Date: Sat, 12 Oct 2019 18:09:56 +0900 Subject: [PATCH] Fix bashisms in install.sh `[ ... == ... ]` is Bash extension. install.sh should use syntax of standard `test` command. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1706f1dace4..cc5dcd0cb6a 100755 --- a/install.sh +++ b/install.sh @@ -78,7 +78,7 @@ checkLatestVersion() { elif [ "$DOWNLOAD_TOOL" = "wget" ]; then tag=$(wget -q -O - $latest_url | grep -o "Release $regex ยท arduino/arduino-cli" | grep -o "$regex") fi - if [ "x$tag" == "x" ]; then + if [ "x$tag" = "x" ]; then echo "Cannot determine latest tag." exit 1 fi @@ -122,7 +122,7 @@ downloadFile() { checkLatestVersion TAG echo "TAG=$TAG" # arduino-cli_0.4.0-rc1_Linux_64bit.[tar.gz, zip] - if [ "$OS" == "Windows" ]; then + if [ "$OS" = "Windows" ]; then CLI_DIST="arduino-cli_${TAG}_${OS}_${ARCH}.zip" else CLI_DIST="arduino-cli_${TAG}_${OS}_${ARCH}.tar.gz"