diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-06T15·11+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-06T15·11+0000 |
commit | 7952a8053c474e771d6ee14e3ab6dc15c9ddd895 (patch) | |
tree | 1aa192faa08ebb092e85eeb4127bf414b29b2193 /src/nix-hash.cc | |
parent | bfa5d77211385cd8abe5d0833f84a8151ccab37d (diff) |
* A utility `nix-hash' to compute Nix path hashes.
Diffstat (limited to 'src/nix-hash.cc')
-rw-r--r-- | src/nix-hash.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nix-hash.cc b/src/nix-hash.cc new file mode 100644 index 000000000000..e35d0a1feda3 --- /dev/null +++ b/src/nix-hash.cc @@ -0,0 +1,16 @@ +#include <iostream> + +#include "hash.hh" +#include "shared.hh" + + +void run(Strings args) +{ + for (Strings::iterator it = args.begin(); + it != args.end(); it++) + cout << format("%1%\n") % (string) hashPath(*it); +} + + +string programId = "nix-hash"; + |