lix/corepkgs/fetchurl/builder.sh.in
2005-03-15 12:03:15 +00:00

11 lines
270 B
Bash

#! @shell@ -e
echo "downloading $url into $out"
prefetch=@storedir@/nix-prefetch-url-$outputHash
if test -f "$prefetch"; then
echo "using prefetched $prefetch";
@coreutils@/mv $prefetch $out
else
@curl@ --fail --location --max-redirs 20 "$url" > "$out"
fi