about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-11T22·07-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-11T22·07-0400
commit15c15da482eb30f95f4dab04b582a45edc10815b (patch)
treea25c01e011af580a5ecbf2f7a26b90c1d903cf63 /scripts
parentd287b62b6432ce3155e963c6471edf79ec70439a (diff)
Add some missing --version switches
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nix-build.in5
-rwxr-xr-xscripts/nix-channel.in5
2 files changed, 10 insertions, 0 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index 35b186bb715d..13404f1dcb53 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -58,6 +58,11 @@ EOF
         # '` hack
     }
 
+    elsif ($arg eq "--version") {
+        print "nix-build (Nix) $Nix::Config::version\n";
+        exit 0;
+    }
+    
     elsif ($arg eq "--add-drv-link") {
         $drvLink = "./derivation";
     }
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index 6883ffd18db2..e7a4b0900e86 100755
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -194,6 +194,11 @@ while (scalar @ARGV) {
         usageError;
     }
 
+    elsif ($arg eq "--version") {
+        print "nix-channel (Nix) $Nix::Config::version\n";
+        exit 0;
+    }
+    
     else {
         die "unknown argument `$arg'; try `--help'";
     }