Author: ludo
Date: Wed Mar 23 14:51:21 2011
New Revision: 26468
URL: https://svn.nixos.org/websvn/nix/?rev=26468&sc=1
Log:
Make `update-gcc.sh' more robust.
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.4/update-gcc.sh
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.4/update-gcc.sh
==============================================================================
---
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.4/update-gcc.sh
Wed Mar 23 14:51:17 2011 (r26467)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.4/update-gcc.sh
Wed Mar 23 14:51:21 2011 (r26468)
@@ -36,11 +36,13 @@
file="gcc-${component}-${version}.tar.bz2"
url="${dir}/${file}"
- path_and_hash="$(nix-prefetch-url "$url" 2>&1 | grep -E '^(hash|path) is')"
- path="$(echo $path_and_hash | sed -e's/^.*path is \([^ ]\+\).*$/\1/g')"
- hash="$(echo $path_and_hash | sed -e's/^.*hash is \([^ ]\+\).*$/\1/g')"
+ rm -f "${file}"
- rm -f "${url}.sig"
+ wget "$url"
+ hash="$(nix-hash --flat --type sha256 "$file")"
+ path="$(nix-store --add-fixed sha256 "$file")"
+
+ rm -f "${file}" "${file}.sig"
wget "${url}.sig"
gpg --verify "${file}.sig" "${path}"
rm "${file}.sig"
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits