summary refs log tree commit diff
path: root/src/nix-store
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-12-01 15:55:05 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-12-01 15:55:05 +0000
commit078e20885e0805e04669f9b334a516a6d8d12763 (patch)
treef16741a27866a46806c99ec8d5c8371ae5298046 /src/nix-store
parent905d5b91fa6fa64e549f9019f9fab4150f00c13a (diff)
downloadguix-078e20885e0805e04669f9b334a516a6d8d12763.tar.gz
* Help text for all (non-script) programs, so no more:
$ nix-instantiate --help
error: unknown flag `--help`
Try `nix-instantiate --help' for more information.

:-)

Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/Makefile.am2
-rw-r--r--src/nix-store/main.cc10
2 files changed, 2 insertions, 10 deletions
diff --git a/src/nix-store/Makefile.am b/src/nix-store/Makefile.am
index 3738c53ca2..80e5987429 100644
--- a/src/nix-store/Makefile.am
+++ b/src/nix-store/Makefile.am
@@ -6,7 +6,7 @@ nix_store_LDADD = ../libmain/libmain.a ../libstore/libstore.a ../libutil/libutil
 
 main.o: help.txt.hh
 
-%.hh: %
+%.txt.hh: %.txt
 	../bin2c/bin2c helpText < $< > $@ || (rm $@ && exit 1)
 
 AM_CXXFLAGS = \
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc
index c73de52896..48752c2bf5 100644
--- a/src/nix-store/main.cc
+++ b/src/nix-store/main.cc
@@ -12,14 +12,12 @@
 typedef void (* Operation) (Strings opFlags, Strings opArgs);
 
 
-static void printHelp()
+void printHelp()
 {
     cout << string((char *) helpText, sizeof helpText);
-    exit(0);
 }
 
 
-
 static Path checkPath(const Path & arg)
 {
     return arg; /* !!! check that arg is in the store */
@@ -276,12 +274,6 @@ void run(Strings args)
             op = opInit;
         else if (arg == "--verify")
             op = opVerify;
-        else if (arg == "--verbose" || arg == "-v")
-            verbosity = (Verbosity) ((int) verbosity + 1);
-        else if (arg == "--keep-failed" || arg == "-K")
-            keepFailed = true;
-        else if (arg == "--help")
-            printHelp();
         else if (arg[0] == '-')
             opFlags.push_back(arg);
         else