* Clean up calls to system().

This commit is contained in:
Eelco Dolstra 2006-09-25 10:44:27 +00:00
parent 76c9710091
commit 68ae953d8a
8 changed files with 26 additions and 26 deletions

View file

@ -68,7 +68,7 @@ if ($interactive && !defined $ENV{"NIX_HAVE_TERMINAL"}) {
my $tmpDir;
do { $tmpDir = tmpnam(); }
until mkdir $tmpDir, 0777;
END { if (defined $tmpDir) { my $x = $?; system ("@coreutils@/rm", "-rf", $tmpDir); $? = $x; } }
END { if (defined $tmpDir) { my $x = $?; system("@coreutils@/rm", "-rf", $tmpDir); $? = $x; } }
sub barf {
@ -83,7 +83,7 @@ sub barf {
my $pkgFile = $source;
if ($fromURL) {
$pkgFile = "$tmpDir/tmp.nixpkg";
system ("@curl@", "--silent", $source, "-o", $pkgFile) == 0
system("@curl@", "--silent", $source, "-o", $pkgFile) == 0
or barf "curl failed: $?";
}
@ -124,12 +124,12 @@ if ($interactive) {
print "\nPulling manifests...\n";
system ("@bindir@/nix-pull", $manifestURL) == 0
system("@bindir@/nix-pull", $manifestURL) == 0
or barf "nix-pull failed: $?";
print "\nInstalling package...\n";
system ("@bindir@/nix-env", "--install", $outPath, @extraNixEnvArgs) == 0
system("@bindir@/nix-env", "--install", $outPath, @extraNixEnvArgs) == 0
or barf "nix-env failed: $?";