Collapsing some if/else conditions with elif
parent
db0051753a
commit
4f081ce4be
|
@ -75,22 +75,19 @@ if [ -z "$METHOD" ]; then
|
||||||
echo >&2 "You need git, curl, or wget to install nvm"
|
echo >&2 "You need git, curl, or wget to install nvm"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
elif [ "~$METHOD" = "~git" ]; then
|
||||||
if [ "~$METHOD" = "~git" ]; then
|
|
||||||
if ! nvm_has "git"; then
|
if ! nvm_has "git"; then
|
||||||
echo >&2 "You need git to install nvm"
|
echo >&2 "You need git to install nvm"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
install_nvm_from_git
|
install_nvm_from_git
|
||||||
fi
|
elif [ "~$METHOD" = "~script" ]; then
|
||||||
if [ "~$METHOD" = "~script" ]; then
|
|
||||||
if ! nvm_has "nvm_download"; then
|
if ! nvm_has "nvm_download"; then
|
||||||
echo >&2 "You need curl or wget to install nvm"
|
echo >&2 "You need curl or wget to install nvm"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
install_nvm_as_script
|
install_nvm_as_script
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue