diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-20T09·20+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-20T09·20+0000 |
commit | 53e376d836133a660223198c7bb8308fb912375e (patch) | |
tree | 92d5e5381b9bfafd2a79d3efdec71f14edb798d9 /src/nix-hash/nix-hash.cc | |
parent | 0eab306466fdb186c692521dd1f2b949e56c54da (diff) |
* Refactored the source tree.
Diffstat (limited to 'src/nix-hash/nix-hash.cc')
-rw-r--r-- | src/nix-hash/nix-hash.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nix-hash/nix-hash.cc b/src/nix-hash/nix-hash.cc new file mode 100644 index 000000000000..77c169b9a952 --- /dev/null +++ b/src/nix-hash/nix-hash.cc @@ -0,0 +1,20 @@ +#include <iostream> + +#include "hash.hh" +#include "shared.hh" + + +void run(Strings args) +{ + bool flat = false; + for (Strings::iterator i = args.begin(); + i != args.end(); i++) + if (*i == "--flat") flat = true; + else + cout << format("%1%\n") % (string) + (flat ? hashFile(*i) : hashPath(*i)); +} + + +string programId = "nix-hash"; + |