Created
December 30, 2016 20:25
-
-
Save paulgibbs/9e3207fd912f84935d9bc888ae08beaa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WHSHASCRIPT="sha1sum" && (type sha1sum >/dev/null 2>&1 || WHSHASCRIPT="shasum") |
For the record, I've iterated on this approach; I was using this to find which sha-1 tool exists (mac vs most linux) - and then run it - but i've switched approach to using the openssl
program, like this: cat %2$s | openssl dgst -sha1 -binary | xxd -p
Only problem I can see with using that program is how can you guarantee the binary is in the user's path?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also I agree my original guess is wrong. I assumed you had
sha1sum
on your Mac, which of course you don't.