Use mktemp for tempdir creation in prefetchers.
This incorporates the following two commits from <nixpkgs>: NixOS/nixpkgs@f83af95f8a NixOS/nixpkgs@5e7a1cf955 Hydra was the original reason why I was fixing tempdir creation in the first place. Seeing that Hydra ships its own versions of these scripts, we need to patch them here as well. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
@ -35,11 +35,10 @@ fi
|
||||
# download the file and add it to the store.
|
||||
if test -z "$finalPath"; then
|
||||
|
||||
tmpPath=/tmp/hg-checkout-tmp-$$
|
||||
tmpArchive=$tmpPath/hg-archive
|
||||
mkdir $tmpPath
|
||||
tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/hg-checkout-tmp-XXXXXXXX")"
|
||||
trap "rm -rf \"$tmpPath\"" EXIT
|
||||
|
||||
trap "rm -rf $tmpPath" EXIT
|
||||
tmpArchive="$tmpPath/hg-archive"
|
||||
|
||||
# Perform the checkout.
|
||||
if [[ $url != /* ]]; then
|
||||
|
Reference in New Issue
Block a user