about summary refs log tree commit diff
path: root/scripts/nix-push
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T19·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T19·27+0000
commit81304a6bb595e64d868ef4eb4bfcc08014ced939 (patch)
tree15e72f48b5ea928bd0231878248929e5060a1464 /scripts/nix-push
parente5fbf5804192fa62d0edab0f6b323cc0c8d890f9 (diff)
* Convert tabs to spaces.
Diffstat (limited to 'scripts/nix-push')
-rw-r--r--scripts/nix-push50
1 files changed, 25 insertions, 25 deletions
diff --git a/scripts/nix-push b/scripts/nix-push
index 14b7e2834675..731532f1e9a4 100644
--- a/scripts/nix-push
+++ b/scripts/nix-push
@@ -11,9 +11,9 @@ foreach my $hash (@ARGV) {
     my @paths;
     open PATHS, "nix -qrh $hash 2> /dev/null |" or die "nix -qrh";
     while (<PATHS>) {
-	chomp;
-	next unless /^\//;
-	push @paths, $_;
+        chomp;
+        next unless /^\//;
+        push @paths, $_;
     }
     close PATHS;
 
@@ -21,38 +21,38 @@ foreach my $hash (@ARGV) {
     # a Nix archive.
     foreach my $path (@paths) {
 
-	# Hash the path.
-	my $phash = `nix-hash $path`;
-	$? and die "nix-hash";
-	chomp $phash;
-	die unless $phash =~ /^([0-9a-z]{32})$/;
+        # Hash the path.
+        my $phash = `nix-hash $path`;
+        $? and die "nix-hash";
+        chomp $phash;
+        die unless $phash =~ /^([0-9a-z]{32})$/;
 
-	# Construct a Fix expression that creates a Nar archive.
-	my $fixexpr = 
+        # Construct a Fix expression that creates a Nar archive.
+        my $fixexpr = 
           "App(IncludeFix(\"nar/nar.fix\"), " .
           "[ (\"path\", Path(\"$path\", Hash(\"$phash\"), [Include(\"$hash\")]))" .
           ", (\"name\", \"$phash.nar\")" .
           "])";
 	
-	my $fixfile = "/tmp/nix-push-tmp.fix";
-	open FIX, ">$fixfile";
-	print FIX $fixexpr;
-	close FIX;
+        my $fixfile = "/tmp/nix-push-tmp.fix";
+        open FIX, ">$fixfile";
+        print FIX $fixexpr;
+        close FIX;
 
-	# Instantiate a Nix expression from the Fix expression.
-	my $nhash = `fix $fixfile`;
-	$? and die "instantiating Nix archive expression";
-	chomp $nhash;
-	die unless $nhash =~ /^([0-9a-z]{32})$/;
+        # Instantiate a Nix expression from the Fix expression.
+        my $nhash = `fix $fixfile`;
+        $? and die "instantiating Nix archive expression";
+        chomp $nhash;
+        die unless $nhash =~ /^([0-9a-z]{32})$/;
 
-	# Realise the Nix expression.
-	my $npath = `nix -qph $nhash 2> /dev/null`;
-	$? and die "creating Nix archive";
-	chomp $npath;
+        # Realise the Nix expression.
+        my $npath = `nix -qph $nhash 2> /dev/null`;
+        $? and die "creating Nix archive";
+        chomp $npath;
 
-	push @pushlist, $npath;
+        push @pushlist, $npath;
 
-	print "$path -> $npath\n";
+        print "$path -> $npath\n";
     }
 }