Output binaries with input file basename.

This commit is contained in:
Markus Birth 2018-10-15 00:26:00 +02:00
parent c0681bc757
commit 465cbde339
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A

2
gcd.py

@ -170,7 +170,7 @@ with open(FILE, "rb") as f:
#print(" > " + repr(payloadshort)) #print(" > " + repr(payloadshort))
add_to_cksum(payload) add_to_cksum(payload)
if ttype in [0x0505, 0x02bd]: if ttype in [0x0505, 0x02bd]:
with open("fw_{:04x}.bin".format(ttype), "ab") as of: with open("{}_{:04x}.bin".format(FILE, ttype), "ab") as of:
of.write(payload) of.write(payload)
i = i + 1 i = i + 1