[Performance] Use awk's comparison to save a pipe to grep
parent
6cb12b0f99
commit
316c9f34c6
4
nvm.sh
4
nvm.sh
|
@ -1181,9 +1181,7 @@ nvm_get_checksum() {
|
|||
SHASUMS_URL="${MIRROR}/${3}/SHASUMS.txt"
|
||||
fi
|
||||
|
||||
nvm_download -L -s "${SHASUMS_URL}" -o - | \
|
||||
nvm_grep "${4}.tar.${5}" | \
|
||||
command awk '{print $1}'
|
||||
nvm_download -L -s "${SHASUMS_URL}" -o - | command awk "{ if (\"${4}.tar.${5}\" == \$2) print \$1}"
|
||||
}
|
||||
|
||||
nvm_checksum() {
|
||||
|
|
Loading…
Reference in New Issue