Jordan Harband
2014-07-07 15:40:59 -07:00
parent cf5bfecec4
commit 63f72b37df
2 changed files with 15 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ if [ -z "$NVM_DIR" ]; then
NVM_DIR="$HOME/.nvm"
fi
nvm_curl() {
nvm_download() {
if nvm_has "curl"; then
curl $*
elif nvm_has "wget"; then
@@ -59,7 +59,7 @@ install_nvm_as_script() {
else
echo "=> Downloading nvm as script to '$NVM_DIR'"
fi
nvm_curl -s "$NVM_SOURCE" -o "$NVM_DIR/nvm.sh" || {
nvm_download -s "$NVM_SOURCE" -o "$NVM_DIR/nvm.sh" || {
echo >&2 "Failed to download '$NVM_SOURCE'.."
return 1
}
@@ -69,7 +69,7 @@ if [ -z "$METHOD" ]; then
# Autodetect install method
if nvm_has "git"; then
install_nvm_from_git
elif nvm_has "nvm_curl"; then
elif nvm_has "nvm_download"; then
install_nvm_as_script
else
echo >&2 "You need git, curl, or wget to install nvm"
@@ -84,7 +84,7 @@ else
install_nvm_from_git
fi
if [ "$METHOD" = "script" ]; then
if ! nvm_has "nvm_curl"; then
if ! nvm_has "nvm_download"; then
echo >&2 "You need curl or wget to install nvm"
exit 1
fi