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:
parent
905d5b91fa
commit
078e20885e
14 changed files with 126 additions and 32 deletions
|
@ -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
6
src/nix-hash/help.txt
Normal 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
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue