mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 08:39:08 +03:00
* Don't pollute /tmp.
svn path=/nixpkgs/trunk/; revision=5769
This commit is contained in:
parent
38420dfd6f
commit
0a355c0073
@ -36,11 +36,12 @@ fi
|
||||
# download the file and add it to the store.
|
||||
if test -z "$finalPath"; then
|
||||
|
||||
# !!! race? should be relatively safe, `svn export' barfs if $tmpPath exists.
|
||||
tmpPath=/tmp/svn-checkout-tmp-$$
|
||||
tmpFile=$tmpPath/svn-export
|
||||
mkdir $tmpPath
|
||||
|
||||
trap "rm -rf $tmpPath" EXIT
|
||||
|
||||
# Perform the checkout.
|
||||
# !!! remove 2>/dev/null when we have fixed the certificate hackery.
|
||||
echo p | svn export -r "$rev" "$url" $tmpFile 2>/dev/null >&2
|
||||
@ -52,8 +53,6 @@ if test -z "$finalPath"; then
|
||||
# Add the downloaded file to the Nix store.
|
||||
finalPath=$(nix-store --add-fixed --recursive "$hashType" $tmpFile)
|
||||
|
||||
if test -n "$tmpPath"; then rm -rf $tmpPath || true; fi
|
||||
|
||||
if test -n "$expHash" -a "$expHash" != "$hash"; then
|
||||
echo "hash mismatch for URL \`$url'"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user