1 #! /usr/bin/env python3
3 # Usage: scripts/qemu-stamp.py STRING1 STRING2... -- FILE1 FILE2...
10 for arg
in sys
.argv
[1:]:
15 with
open(arg
, 'rb') as f
:
16 for chunk
in iter(lambda: f
.read(65536), b
''):
19 sha
.update(os
.fsencode(arg
))
22 # The hash can start with a digit, which the compiler doesn't
23 # like as an symbol. So prefix it with an underscore
24 print("_" + sha
.hexdigest())