Remove some new bashisms
parent
9a0c269713
commit
a9be598241
6
nvm.sh
6
nvm.sh
|
@ -393,7 +393,7 @@ nvm() {
|
||||||
else
|
else
|
||||||
echo "Could not find $NVM_DIR/*/share/man in \$MANPATH"
|
echo "Could not find $NVM_DIR/*/share/man in \$MANPATH"
|
||||||
fi
|
fi
|
||||||
if [[ $NODE_PATH == *$NVM_DIR/*/lib/node_modules* ]]; then
|
if [ `expr $NODE_PATH : ".*$NVM_DIR/.*/lib/node_modules.*"` != 0 ] ; then
|
||||||
export NODE_PATH=${NODE_PATH%$NVM_DIR/*/lib/node_modules*}${NODE_PATH#*$NVM_DIR/*/lib/node_modules:}
|
export NODE_PATH=${NODE_PATH%$NVM_DIR/*/lib/node_modules*}${NODE_PATH#*$NVM_DIR/*/lib/node_modules:}
|
||||||
echo "$NVM_DIR/*/lib/node_modules removed from \$NODE_PATH"
|
echo "$NVM_DIR/*/lib/node_modules removed from \$NODE_PATH"
|
||||||
else
|
else
|
||||||
|
@ -438,7 +438,7 @@ nvm() {
|
||||||
else
|
else
|
||||||
MANPATH="$NVM_DIR/$VERSION/share/man:$MANPATH"
|
MANPATH="$NVM_DIR/$VERSION/share/man:$MANPATH"
|
||||||
fi
|
fi
|
||||||
if [[ $NODE_PATH == *$NVM_DIR/*/lib/node_modules* ]]; then
|
if [ `expr $NODE_PATH : ".*$NVM_DIR/.*/lib/node_modules.*"` != 0 ]; then
|
||||||
NODE_PATH=${NODE_PATH%$NVM_DIR/*/lib/node_modules*}$NVM_DIR/$VERSION/lib/node_modules${NODE_PATH#*$NVM_DIR/*/lib/node_modules}
|
NODE_PATH=${NODE_PATH%$NVM_DIR/*/lib/node_modules*}$NVM_DIR/$VERSION/lib/node_modules${NODE_PATH#*$NVM_DIR/*/lib/node_modules}
|
||||||
else
|
else
|
||||||
NODE_PATH="$NVM_DIR/$VERSION/lib/node_modules:$NODE_PATH"
|
NODE_PATH="$NVM_DIR/$VERSION/lib/node_modules:$NODE_PATH"
|
||||||
|
@ -462,7 +462,7 @@ nvm() {
|
||||||
echo "$VERSION version is not installed yet"
|
echo "$VERSION version is not installed yet"
|
||||||
return;
|
return;
|
||||||
fi
|
fi
|
||||||
if [[ $NODE_PATH == *$NVM_DIR/*/lib/node_modules* ]]; then
|
if [ `expr $NODE_PATH : ".*$NVM_DIR/.*/lib/node_modules.*"` != 0 ]; then
|
||||||
RUN_NODE_PATH=${NODE_PATH%$NVM_DIR/*/lib/node_modules*}$NVM_DIR/$VERSION/lib/node_modules${NODE_PATH#*$NVM_DIR/*/lib/node_modules}
|
RUN_NODE_PATH=${NODE_PATH%$NVM_DIR/*/lib/node_modules*}$NVM_DIR/$VERSION/lib/node_modules${NODE_PATH#*$NVM_DIR/*/lib/node_modules}
|
||||||
else
|
else
|
||||||
RUN_NODE_PATH="$NVM_DIR/$VERSION/lib/node_modules:$NODE_PATH"
|
RUN_NODE_PATH="$NVM_DIR/$VERSION/lib/node_modules:$NODE_PATH"
|
||||||
|
|
Loading…
Reference in New Issue