Merge pull request #57 from ghuntley/zsh

zsh compatibility fixes
master
Tim Caswell 2011-08-25 09:16:22 -07:00
commit c562a491ca
1 changed files with 3 additions and 3 deletions

6
nvm.sh
View File

@ -16,7 +16,7 @@ if [ ! `which curl` ]; then
curl() { curl() {
ARGS="$* " ARGS="$* "
ARGS=${ARGS/-s /-q } ARGS=${ARGS/-s /-q }
ARGS=${ARGS/-\# /} ARGS=${ARGS/--progress-bar /}
ARGS=${ARGS/-C - /-c } ARGS=${ARGS/-C - /-c }
ARGS=${ARGS/-o /-O } ARGS=${ARGS/-o /-O }
@ -56,7 +56,7 @@ nvm_version()
return return
fi fi
if [ ! "$VERSION" ]; then if [ ! "$VERSION" ]; then
VERSION=`(cd $NVM_DIR; \ls -d v${PATTERN}* 2>/dev/null) | sort -t. -k 2,1n -k 2,2n -k 3,3n | tail -n1` VERSION=`(cd $NVM_DIR; \ls -d v${~PATTERN}* 2>/dev/null) | sort -t. -k 2,1n -k 2,2n -k 3,3n | tail -n1`
fi fi
if [ ! "$VERSION" ]; then if [ ! "$VERSION" ]; then
echo "N/A" echo "N/A"
@ -118,7 +118,7 @@ nvm()
[ ! -z $tarball ] && \ [ ! -z $tarball ] && \
mkdir -p "$NVM_DIR/src" && \ mkdir -p "$NVM_DIR/src" && \
cd "$NVM_DIR/src" && \ cd "$NVM_DIR/src" && \
curl -C - -# $tarball -o "node-$VERSION.tar.gz" && \ curl -C - --progress-bar $tarball -o "node-$VERSION.tar.gz" && \
tar -xzf "node-$VERSION.tar.gz" && \ tar -xzf "node-$VERSION.tar.gz" && \
cd "node-$VERSION" && \ cd "node-$VERSION" && \
./configure --prefix="$NVM_DIR/$VERSION" && \ ./configure --prefix="$NVM_DIR/$VERSION" && \