fix: exit 1 when a hash lookup finds nothing

The documented example looked up a test fixture hash, printed NOT FOUND
and exited 0. The docs now use a hash the database holds and say which
line forms a hash file accepts.
This commit is contained in:
Abdessamad Derraz committed 2026-10-18 07:19:01 +02:00
1 parent 84a144be66
commit d6d03617db
6 files changed
+45 -10

No files matched your search

+7 -2
View File
@@ -9,10 +9,15 @@ Fine-grained control over pack generation, hardware filtering, truth analysis, a
Look up a single MD5 in the database:
```bash
python scripts/generate_pack.py --from-md5 d8f1206299c48946e6ec5ef96d014eaa
python scripts/generate_pack.py --from-md5 490f666e1afb15b7362b406ed1cea246
```
Build a pack containing only files matching hashes from a list (one MD5 per line, `#` for comments):
It prints the file's name, hashes, path and whether the collection holds it,
and exits 1 when a hash is not in the database, so a script can tell.
Build a pack containing only files matching hashes from a list. Each line
carries one hash (MD5, SHA-1 or CRC32), alone or beside a file name as
`md5sum` writes it; `#` starts a comment:
```bash
python scripts/generate_pack.py --platform batocera --from-md5-file missing.txt