diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-09-11 11:15:37 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-09-11 11:15:37 +0000 |
commit | ea9667ab1893decab3f45d67f452e52fe770e2f1 (patch) | |
tree | b7593493c6d5154ff3f7e5c75ccb59d71307416c /maintainers | |
parent | 105344a44ea109d9ba23c210b3b3e1a601cf2e54 (diff) |
* Fixed some more URLs.
svn path=/nixpkgs/trunk/; revision=9294
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/scripts/evacuate-urls.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/maintainers/scripts/evacuate-urls.sh b/maintainers/scripts/evacuate-urls.sh index 04fdfd89bde31..3aa368ec6682b 100755 --- a/maintainers/scripts/evacuate-urls.sh +++ b/maintainers/scripts/evacuate-urls.sh @@ -9,7 +9,7 @@ find "$1" -name "*.nix" | while read fn; do if url=$(echo "$line" | sed 's^url = \(.*\);^\1^'); then if ! echo "$url" | grep -q -E "www.cs.uu.nl|nix.cs.uu.nl|.stratego-language.org|java.sun.com|ut2004|linuxq3a|RealPlayer|Adbe|belastingdienst|microsoft|armijn/.nix|sun.com|archive.eclipse.org"; then - base=$(basename $url) + base="$(basename "$url")" newPath="$distDir/$base" if test -e "$newPath"; then @@ -20,7 +20,11 @@ find "$1" -name "*.nix" | while read fn; do if test -z "$hash"; then hash=$(fgrep -A 1 "$url" "$fn" | grep sha256 | sed 's^.*sha256 = \"\(.*\)\";.*^\1^') hashType="sha256 --base32" - if test -z "$hash"; then + if test -n "$hash"; then + if test "${#hash}" = 64; then + hash=$(nix-hash --to-base32 --type sha256 $hash) + fi + else hash=$(fgrep -A 1 "$url" "$fn" | grep sha1 | sed 's^.*sha1 = \"\(.*\)\";.*^\1^') hashType="sha1" if test -z "$hash"; then @@ -31,13 +35,13 @@ find "$1" -name "*.nix" | while read fn; do fi #echo "HASH = $hash" if ! test "$(nix-hash --type $hashType --flat "$newPath")" = "$hash"; then - echo "WARNING: $fn: $newPath exists and differs!" + echo "WARNING: $fn: $newPath exists and differs, hash should be $hash!" continue fi else - if echo $url | grep -q '^mirror://'; then + if echo $url | grep -q 'mirror://'; then #echo "$fn: skipping mirrored $url" continue fi @@ -74,4 +78,6 @@ find "$1" -name "*.nix" | while read fn; do done -done \ No newline at end of file +done + +echo DONE \ No newline at end of file |