Make shasum the lowest priority checksum command.

This fixes false "Checksums do not match" errors on systems where shasum
is a symlink to sha256sum or otherwise.
master
Kevin Wang 2014-08-26 23:52:53 -05:00
parent fd9e01b7e6
commit 814319d7c0
1 changed files with 3 additions and 3 deletions

6
nvm.sh
View File

@ -278,12 +278,12 @@ nvm_ls_remote() {
}
nvm_checksum() {
if nvm_has "shasum"; then
checksum=$(shasum $1 | \awk '{print $1}')
if nvm_has "sha1sum"; then
checksum=$(sha1sum $1 | \awk '{print $1}')
elif nvm_has "sha1"; then
checksum=$(sha1 -q $1)
else
checksum=$(sha1sum $1 | \awk '{print $1}')
checksum=$(shasum $1 | \awk '{print $1}')
fi
if [ "$checksum" = "$2" ]; then