Created
December 9, 2015 11:21
-
-
Save skratchdot/8053931ee7f3e30dec9d to your computer and use it in GitHub Desktop.
Get the shasum hash of an entire directory (recursively)
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
#!/bin/sh | |
find ./src -type f -print0 | sort -z | xargs -0 shasum | shasum |
@skratchdot np, maybe it's helpful for another person!
There are trade-offs. The original solution should work on nix systems without requiring additional packages.
You might consider explicitly using SHA256
in your shasum
invocations.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@gregl83 - nice! thanks for adding this link / sharing your project. it looks pretty cool (and i like the explanation in the "how it works" section).