From 13143a84e45f06728db7f6a0722098eb01b3a236 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 29 Jun 2016 12:54:17 -0400 Subject: Add tamper.hex to firmware tarball; start adding support scripts; more minor build process cleanup. --- build-firmware-package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build-firmware-package.py') diff --git a/build-firmware-package.py b/build-firmware-package.py index 0df116b..de77243 100755 --- a/build-firmware-package.py +++ b/build-firmware-package.py @@ -13,7 +13,7 @@ parser.add_argument("tarfile", type = argparse.FileType("wb"), help = "tarball parser.add_argument("firmware", nargs = "+", help = "firmware files to stuff into tarball") args = parser.parse_args() -tar = tarfile.TarFile(mode = "w", fileobj = args.tarfile) +tar = tarfile.TarFile.open(fileobj = args.tarfile, mode = "w|gz") head = subprocess.check_output(("git", "rev-parse", "HEAD")).strip() time = subprocess.check_output(("git", "show", "-s", "--format=%ct", "HEAD")).strip() commits = [line.split() for line in subprocess.check_output(("git", "submodule", "status")).splitlines()] @@ -32,3 +32,6 @@ with tempfile.NamedTemporaryFile() as f: if gpg.wait(): raise subprocess.CalledProcessError(gpg.returncode, "gpg") tar.add(f.name, "MANIFEST") + +tar.close() +args.tarfile.close() -- cgit v1.2.3