Add nvm_get_checksum_alg

This commit is contained in:
Jordan Harband
2016-08-09 22:24:09 -07:00
parent bd3ca47714
commit 9c65197b22
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
ALG="$(nvm_get_checksum_alg)"
case "$ALG" in
'sha-256' | 'sha-1')
echo 'sha-256 or sha-1 found'
;;
*)
die "sha-256 or sha-1 not found: found ${ALG}"
;;
esac