diff --git a/website/static/install/moon.sh b/website/static/install/moon.sh index e3396227886..005631290e3 100755 --- a/website/static/install/moon.sh +++ b/website/static/install/moon.sh @@ -10,7 +10,7 @@ bin="moon" arch=$(uname -sm) version="${1:-latest}" -if [ "$OS" = "Windows_NT" ]; then +if [[ "$OS" == "Windows_NT" ]]; then target="moon-x86_64-pc-windows-msvc.exe" bin="moon.exe" else @@ -43,7 +43,7 @@ else is_wsl=false fi -if [ "$version" == "latest" ]; then +if [[ "$version" == "latest" ]]; then download_url="https://github.com/moonrepo/moon/releases/latest/download/${target}" else download_url="https://github.com/moonrepo/moon/releases/download/v${version}/${target}" @@ -71,7 +71,7 @@ echo " export PATH=\"$install_dir:\$PATH\"" echo echo "Need help? Join our Discord https://discord.gg/qCh9MEynv2" -if [ "$MOON_DEBUG" = "true" ]; then +if [[ "$MOON_DEBUG" == "true" ]]; then echo echo "arch=$arch" echo "target=$target" diff --git a/website/static/install/proto.sh b/website/static/install/proto.sh index 68fc3b9d6ed..982973f4be3 100755 --- a/website/static/install/proto.sh +++ b/website/static/install/proto.sh @@ -11,7 +11,7 @@ arch=$(uname -sm) version="${1:-latest}" ext=".tar.xz" -if [ "$OS" = "Windows_NT" ]; then +if [[ "$OS" == "Windows_NT" ]]; then target="proto_cli-x86_64-pc-windows-msvc" bin="proto.exe" ext=".zip" @@ -43,7 +43,7 @@ else is_wsl=false fi -if [ $# -eq 0 ]; then +if [[ "$version" == "latest" ]]; then download_url="https://github.com/moonrepo/proto/releases/latest/download/$target$ext" else download_url="https://github.com/moonrepo/proto/releases/download/v$version/$target$ext" @@ -62,7 +62,7 @@ fi curl --fail --location --progress-bar --output "$download_file" "$download_url" -if [ "$ext" = ".zip" ]; then +if [[ "$ext" == ".zip" ]]; then unzip -d "$temp_dir" "$download_file" # Unzip doesnt remove components folder @@ -91,7 +91,7 @@ echo "Launch a new terminal window to start using proto!" echo echo "Need help? Join our Discord https://discord.gg/qCh9MEynv2" -if [ "$PROTO_DEBUG" = "true" ]; then +if [[ "$PROTO_DEBUG" == "true" ]]; then echo echo "arch=$arch" echo "target=$target"