From 15c15da482eb30f95f4dab04b582a45edc10815b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 11 Jul 2012 18:07:41 -0400 Subject: [PATCH] Add some missing --version switches --- scripts/nix-build.in | 5 +++++ scripts/nix-channel.in | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 35b186bb7..13404f1dc 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 6883ffd18..e7a4b0900 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'"; }