diff --git a/install.sh b/install.sh index 00ec1fa..8f2f630 100755 --- a/install.sh +++ b/install.sh @@ -20,10 +20,9 @@ nvm_curl() { ARGS=${ARGS/--progress-bar /--progress=bar } ARGS=${ARGS/-L /} ARGS=${ARGS/-I /} - ARGS=${ARGS/-s /-qO- } + ARGS=${ARGS/-s /-q } ARGS=${ARGS/-o /-O } ARGS=${ARGS/-C /-c } - ARGS=${ARGS/ - / } wget $ARGS fi } diff --git a/nvm.sh b/nvm.sh index a762363..a483aa7 100644 --- a/nvm.sh +++ b/nvm.sh @@ -21,10 +21,9 @@ nvm_curl() { ARGS=${ARGS/--progress-bar /--progress=bar } ARGS=${ARGS/-L /} ARGS=${ARGS/-I /} - ARGS=${ARGS/-s /-qO- } + ARGS=${ARGS/-s /-q } ARGS=${ARGS/-o /-O } ARGS=${ARGS/-C /-c } - ARGS=${ARGS/ - / } wget $ARGS fi } @@ -181,7 +180,7 @@ nvm_ls_remote() { else PATTERN=".*" fi - VERSIONS=`nvm_curl -s $NVM_NODEJS_ORG_MIRROR/ \ + VERSIONS=`nvm_curl -s $NVM_NODEJS_ORG_MIRROR/ -o - \ | \egrep -o 'v[0-9]+\.[0-9]+\.[0-9]+' \ | \grep -w "${PATTERN}" \ | sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n` @@ -371,7 +370,7 @@ nvm() { if nvm_binary_available "$VERSION"; then t="$VERSION-$os-$arch" url="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-${t}.tar.gz" - sum=`nvm_curl -s $NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt | \grep node-${t}.tar.gz | awk '{print $1}'` + sum=`nvm_curl -s $NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt -o - | \grep node-${t}.tar.gz | awk '{print $1}'` local tmpdir tmpdir="$NVM_DIR/bin/node-${t}" local tmptarball @@ -408,10 +407,10 @@ nvm() { tmpdir="$NVM_DIR/src" local tmptarball tmptarball="$tmpdir/node-$VERSION.tar.gz" - if [ "`nvm_curl -s -I "$NVM_NODEJS_ORG_MIRROR/$VERSION/node-$VERSION.tar.gz" | \grep '200 OK'`" != '' ]; then + if [ "`nvm_curl -s -I "$NVM_NODEJS_ORG_MIRROR/$VERSION/node-$VERSION.tar.gz" -o - | \grep '200 OK'`" != '' ]; then tarball="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-$VERSION.tar.gz" - sum=`nvm_curl -s $NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt | \grep node-$VERSION.tar.gz | awk '{print $1}'` - elif [ "`nvm_curl -s -I "$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz" | \grep '200 OK'`" != '' ]; then + sum=`nvm_curl -s $NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt -o - | \grep node-$VERSION.tar.gz | awk '{print $1}'` + elif [ "`nvm_curl -s -I "$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz" -o - | \grep '200 OK'`" != '' ]; then tarball="$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz" fi if ( @@ -436,10 +435,10 @@ nvm() { if [ "`expr "$VERSION" : '\(^v0\.2\.[0-2]$\)'`" != '' ]; then echo "npm requires node v0.2.3 or higher" >&2 else - nvm_curl https://npmjs.org/install.sh | clean=yes npm_install=0.2.19 sh + nvm_curl https://npmjs.org/install.sh -o - | clean=yes npm_install=0.2.19 sh fi else - nvm_curl https://npmjs.org/install.sh | clean=yes sh + nvm_curl https://npmjs.org/install.sh -o - | clean=yes sh fi fi else