Skip to content
Myr

nvm_get_checksum_binary

This file

Path

test/fast/Unit tests/nvm_get_checksum_binary

21 lines · 408 bytes

Last changed by

[Tests] set `$_` before sourcing `nvm.sh` in fast testsJordan Harbandbefore adoptionc451e7a

History of this file

Take it

1#!/bin/sh23set -ex45die () { echo "$@" ; exit 1; }67set +e # TODO: fix8: nvm.sh9\. ../../../nvm.sh10set -e1112BIN="$(nvm_get_checksum_binary)"1314case "${BIN-}" in15  sha256sum | shasum | sha256 | gsha256sum | openssl | bssl | sha1sum | sha1 | shasum)16    echo "${BIN} found"17  ;;18  *)19    die "sha256sum | shasum | sha256 | gsha256sum | openssl | bssl | sha1sum | sha1 | shasum not found: found ${BIN}"20  ;;21esac