1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

* Help text for all (non-script) programs, so no more:

$ nix-instantiate --help
error: unknown flag `--help`
Try `nix-instantiate --help' for more information.

:-)
This commit is contained in:
Eelco Dolstra 2003-12-01 15:55:05 +00:00
parent 905d5b91fa
commit 078e20885e
14 changed files with 126 additions and 32 deletions

View file

@ -4,5 +4,10 @@ nix_hash_SOURCES = nix-hash.cc
nix_hash_LDADD = ../libmain/libmain.a ../libstore/libstore.a ../libutil/libutil.a \
../boost/format/libformat.a -L../../externals/inst/lib -ldb_cxx -lATerm
nix-hash.o: help.txt.hh
%.txt.hh: %.txt
../bin2c/bin2c helpText < $< > $@ || (rm $@ && exit 1)
AM_CXXFLAGS = \
-I.. -I../../externals/inst/include -I../libutil -I../libstore -I../libmain

6
src/nix-hash/help.txt Normal file
View file

@ -0,0 +1,6 @@
nix-hash [OPTIONS...] [FILES...]
`nix-hash computes and prints cryptographic hashes for the specified
files.
--flat: compute hash of regular file contents, not metadata

View file

@ -2,6 +2,13 @@
#include "hash.hh"
#include "shared.hh"
#include "help.txt.hh"
void printHelp()
{
cout << string((char *) helpText, sizeof helpText);
}
void run(Strings args)