2016-08-10 13:24:09 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2016-11-07 03:34:36 +08:00
|
|
|
die () { echo "$@" ; exit 1; }
|
2016-08-10 13:24:09 +08:00
|
|
|
|
2017-03-29 00:37:14 +08:00
|
|
|
set +e # TODO: fix
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../../nvm.sh
|
2017-03-29 00:37:14 +08:00
|
|
|
set -e
|
2016-08-10 13:24:09 +08:00
|
|
|
|
|
|
|
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
|