Merge pull request #875 from mrueg/remove-backticks
[shellcheck] Replace backticks with $() command substitution
commit
772d3223e9
10
nvm.sh
10
nvm.sh
|
@ -1168,7 +1168,7 @@ nvm_install_node_binary() {
|
|||
fi
|
||||
t="$VERSION-$NVM_OS-$NVM_ARCH"
|
||||
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
|
||||
tmpdir="$NVM_DIR/bin/node-${t}"
|
||||
local tmptarball
|
||||
|
@ -1236,10 +1236,10 @@ nvm_install_node_source() {
|
|||
local tmptarball
|
||||
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"
|
||||
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
|
||||
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
|
||||
tarball="$NVM_NODEJS_ORG_MIRROR/node-$VERSION.tar.gz"
|
||||
fi
|
||||
|
||||
|
@ -1710,7 +1710,7 @@ nvm() {
|
|||
echo "$NVM_SUCCESS_MSG"
|
||||
|
||||
# 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
|
||||
nvm unalias "$(command basename "$ALIAS")"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue