aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-20 21:11:43 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-20 21:11:43 +0000
commit7984cfc7c18c85c5db42c5c7d57927b12c846ce0 (patch)
treea728a7500892e4de089c090538cb8fd34e4a1ffa /scripts
parent667a6afb9dabcb3e5c851b910705b7eb1c87c9b6 (diff)
* Argh, another short-write problem. Added wrappers around
read()/write() to fix this once and for all.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nix-switch.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/nix-switch.in b/scripts/nix-switch.in
index 55305418c..2ccb6b4e5 100755
--- a/scripts/nix-switch.in
+++ b/scripts/nix-switch.in
@@ -15,6 +15,9 @@ $hash || die "no package hash specified";
my $linkdir = "@localstatedir@/nix/links";
# Build the specified package, and all its dependencies.
+system "nix -ih $hash";
+if ($?) { die "`nix -ih' failed"; }
+
my $pkgdir = `nix -qph $hash`;
if ($?) { die "`nix -qph' failed"; }
chomp $pkgdir;