diff options
Diffstat (limited to 'scripts/nix-push.in')
-rwxr-xr-x | scripts/nix-push.in | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in index 00d03c3c1f0c..993b94adf064 100755 --- a/scripts/nix-push.in +++ b/scripts/nix-push.in @@ -24,22 +24,11 @@ my $writeManifest = 0; my $archivesURL; my @roots; -sub showSyntax { - print STDERR <<EOF -Usage: nix-push --dest DIR [--manifest] [--url-prefix URL] PATHS... - -`nix-push' packs the closure of PATHS into a set of NAR files stored -in DIR. Optionally generate a manifest. -EOF - ; # ` - exit 1; -} - for (my $n = 0; $n < scalar @ARGV; $n++) { my $arg = $ARGV[$n]; if ($arg eq "--help") { - showSyntax; + exec "man nix-push" or die; } elsif ($arg eq "--bzip2") { $compressionType = "bzip2"; } elsif ($arg eq "--force") { @@ -56,13 +45,13 @@ for (my $n = 0; $n < scalar @ARGV; $n++) { die "$0: `$arg' requires an argument\n" unless $n < scalar @ARGV; $archivesURL = $ARGV[$n]; } elsif (substr($arg, 0, 1) eq "-") { - showSyntax; + die "$0: unknown flag `$arg'\n"; } else { push @roots, $arg; } } -showSyntax if !defined $destDir; +die "$0: please specify a destination directory\n" if !defined $destDir; $archivesURL = "file://$destDir" unless defined $archivesURL; |