mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
* tmpnam() -> File::Temp::tempdir().
This commit is contained in:
parent
34427a7b43
commit
d98f750fd8
7 changed files with 41 additions and 53 deletions
|
@ -1,16 +1,13 @@
|
|||
#! @perl@ -w -I@libexecdir@/nix
|
||||
|
||||
use strict;
|
||||
use POSIX qw(tmpnam);
|
||||
use File::Temp qw(tempdir);
|
||||
use readmanifest;
|
||||
|
||||
my $tmpdir;
|
||||
do { $tmpdir = tmpnam(); }
|
||||
until mkdir $tmpdir, 0777;
|
||||
my $tmpDir = tempdir("nix-pull.XXXXXX", CLEANUP => 1, TMPDIR => 1)
|
||||
or die "cannot create a temporary directory";
|
||||
|
||||
my $manifest = "$tmpdir/manifest";
|
||||
|
||||
END { unlink $manifest; rmdir $tmpdir; }
|
||||
my $manifest = "$tmpDir/manifest";
|
||||
|
||||
my $binDir = $ENV{"NIX_BIN_DIR"};
|
||||
$binDir = "@bindir@" unless defined $binDir;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue