2
0

More portable digest()

This commit is contained in:
Maarten Billemont 2014-10-22 22:02:17 -04:00
parent 85dab50996
commit 2de17384ff

View File

@ -33,11 +33,7 @@ fi
### DEPENDENCIES
digest() {
if hash xxd 2>/dev/null; then
openssl sha1 -binary < "$1" | xxd -p
else
openssl sha1 < "$1" | sed 's/.* //'
fi
openssl sha1 -binary < "$1" | od -t x1 -An -v | tr -d '[:space:]'
}
fetch() {
if hash wget 2>/dev/null; then