diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-05-15 13:33:14 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-05-15 13:33:14 +0000 |
commit | 98be355b2af983dd36d498e6b4875a6e4904ff00 (patch) | |
tree | ba321edc757f91d6762b33a0b93074b8a87cc607 /maintainers | |
parent | 80efe94cd0095ebaa8902b4c02a8a359a96e4497 (diff) |
* Handle SHA-256 hashes.
svn path=/nixpkgs/trunk/; revision=8702
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/scripts/evacuate-urls.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/maintainers/scripts/evacuate-urls.sh b/maintainers/scripts/evacuate-urls.sh index 2263cf5115f8c..381632308cbd7 100755 --- a/maintainers/scripts/evacuate-urls.sh +++ b/maintainers/scripts/evacuate-urls.sh @@ -16,8 +16,17 @@ find . -name "*.nix" | while read fn; do if test -e "$newPath"; then hash=$(fgrep -A 1 "$oldURL" "$fn" | grep md5 | sed 's^.*md5 = \"\(.*\)\";.*^\1^') + hashType=md5 + if test -z "$hash"; then + hash=$(fgrep -A 1 "$oldURL" "$fn" | grep sha256 | sed 's^.*sha256 = \"\(.*\)\";.*^\1^') + hashType="sha256 --base32" + if test -z "$hash"; then + echo "WARNING: cannot figure out the hash for $oldURL" + isSafe= + fi + fi echo "HASH = $hash" - if ! test "$(nix-hash --type md5 --flat "$newPath")" = "$hash"; then + if ! test "$(nix-hash --type $hashType --flat "$newPath")" = "$hash"; then echo "WARNING: $newPath exists and differs!" isSafe= fi |