Use checksum for Windows builds

This commit is contained in:
Peter Squicciarini 2019-05-18 19:15:47 -07:00
parent d7fe3923fc
commit 798eb8cb11

15
sum.sh
View File

@ -1,9 +1,20 @@
#!/bin/bash
# shasum blows up in Azure, so using this
# node package which has similar syntax and identical output
if [[ "$CI_WINDOWS" == "True" ]]; then
npm i -g checksum
fi
sum_file () {
if [[ -f "$1" ]]; then
shasum -a 256 $1 > $1.sha256
shasum $1 > $1.sha1
if [[ "$CI_WINDOWS" == "True" ]]; then
checksum -a sha256 $1 > $1.sha256
checksum -a sha1 $1 > $1.sha1
else
shasum -a 256 $1 > $1.sha256
shasum $1 > $1.sha1
fi
fi
}