mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
Make `update-gcc.sh' more robust.
svn path=/nixpkgs/branches/stdenv-updates/; revision=26468
This commit is contained in:
parent
d887437d8e
commit
2e8c808734
@ -36,11 +36,13 @@ do
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user