Skip to content

Commit 417ba6e

Browse files
committed
fixed multiple 'if commands' to solve 'binary' error
1 parent 8f50d2a commit 417ba6e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#!/bin/sh
2-
set -euo pipefail #exit in case of errors
2+
set -euxo pipefail #exit in case of errors
33

44
# install dependencies
55
while true; do
66
echo -e '\e[91mPLEASE INPUT SUDO PASSWORD WHEN PROMPTED OTHERWISE TERMINAL WILL CLOSE SCRIPT\e[39m'
7-
8-
if [ $(uname -s) == Linux ]; then
7+
8+
system="$uname"
9+
10+
if [[ $system == "Linux" ]]; then
911
echo -e "\xE2\x9D\x8C please input your password to proceed so that the setup runs successfully"
1012
echo
1113

@@ -19,8 +21,7 @@ while true; do
1921
echo
2022
break
2123

22-
elif
23-
[ $(uname -s) == Darwin ]; then
24+
elif [[ $system == "Darwin" ]]; then
2425
if brew update && brew upgrade && brew install git && brew install gh && brew install curl && brew install node && brew install npm; then
2526
echo
2627
break
@@ -30,9 +31,8 @@ while true; do
3031
echo
3132
break
3233

33-
elif [ $(uname -s) == CYGWIN || $(uname -s) ==* ]; then
34+
elif [[ $system == "CYGWIN" || "$(uname)" == * ]]; then
3435
echo "CYGWIN is not yet supported"
35-
else
3636
exit
3737
fi
3838

0 commit comments

Comments
 (0)