mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
* Refactored the source tree.
This commit is contained in:
parent
0eab306466
commit
53e376d836
50 changed files with 0 additions and 1 deletions
20
src/nix-hash/nix-hash.cc
Normal file
20
src/nix-hash/nix-hash.cc
Normal file
|
@ -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";
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue