Replace backticks with $() command substitution

Manuel Rüger 2015-10-28 20:53:15 +01:00
parent a43ff7c9d9
commit 1adcabf5e8
1 changed files with 5 additions and 5 deletions

10
nvm.sh
View File

@ -1168,7 +1168,7 @@ nvm_install_node_binary() {
fi fi
t="$VERSION-$NVM_OS-$NVM_ARCH" t="$VERSION-$NVM_OS-$NVM_ARCH"
url="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-${t}.tar.gz" url="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-${t}.tar.gz"
sum=`nvm_download -L -s "$NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt" -o - | command grep "node-${t}.tar.gz" | command awk '{print $1}'` sum=$(nvm_download -L -s "$NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt" -o - | command grep "node-${t}.tar.gz" | command awk '{print $1}')
local tmpdir local tmpdir
tmpdir="$NVM_DIR/bin/node-${t}" tmpdir="$NVM_DIR/bin/node-${t}"
local tmptarball local tmptarball
@ -1236,10 +1236,10 @@ nvm_install_node_source() {
local tmptarball local tmptarball
tmptarball="$tmpdir/node-$VERSION.tar.gz" tmptarball="$tmpdir/node-$VERSION.tar.gz"
if [ "`nvm_download -L -s -I "$NVM_NODEJS_ORG_MIRROR/$VERSION/node-$VERSION.tar.gz" -o - 2>&1 | command grep '200 OK'`" != '' ]; then if [ "$(nvm_download -L -s -I "$NVM_NODEJS_ORG_MIRROR/$VERSION/node-$VERSION.tar.gz" -o - 2>&1 | command grep '200 OK')" != '' ]; then
tarball="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-$VERSION.tar.gz" tarball="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-$VERSION.tar.gz"
sum=`nvm_download -L -s "$NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt" -o - | command grep "node-${VERSION}.tar.gz" | command awk '{print $1}'` sum=$(nvm_download -L -s "$NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt" -o - | command grep "node-${VERSION}.tar.gz" | command awk '{print $1}')
elif [ "`nvm_download -L -s -I "$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz" -o - | command grep '200 OK'`" != '' ]; then elif [ "$(nvm_download -L -s -I "$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz" -o - | command grep '200 OK')" != '' ]; then
tarball="$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz" tarball="$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz"
fi fi
@ -1710,7 +1710,7 @@ nvm() {
echo "$NVM_SUCCESS_MSG" echo "$NVM_SUCCESS_MSG"
# rm any aliases that point to uninstalled version. # rm any aliases that point to uninstalled version.
for ALIAS in `command grep -l "$VERSION" "$(nvm_alias_path)/*" 2>/dev/null` for ALIAS in $(command grep -l "$VERSION" "$(nvm_alias_path)/*" 2>/dev/null)
do do
nvm unalias "$(command basename "$ALIAS")" nvm unalias "$(command basename "$ALIAS")"
done done