More portable digest()
This commit is contained in:
parent
85dab50996
commit
2de17384ff
@ -33,11 +33,7 @@ fi
|
|||||||
### DEPENDENCIES
|
### DEPENDENCIES
|
||||||
|
|
||||||
digest() {
|
digest() {
|
||||||
if hash xxd 2>/dev/null; then
|
openssl sha1 -binary < "$1" | od -t x1 -An -v | tr -d '[:space:]'
|
||||||
openssl sha1 -binary < "$1" | xxd -p
|
|
||||||
else
|
|
||||||
openssl sha1 < "$1" | sed 's/.* //'
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
fetch() {
|
fetch() {
|
||||||
if hash wget 2>/dev/null; then
|
if hash wget 2>/dev/null; then
|
||||||
|
Loading…
Reference in New Issue
Block a user