From 75dbc2abdb4103a59a7b348b29fc5b48da7e9012 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 10 Feb 2013 21:12:15 +0200 Subject: Compress man files. --- builder_install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'builder_install.py') diff --git a/builder_install.py b/builder_install.py index 67537db..9df5612 100755 --- a/builder_install.py +++ b/builder_install.py @@ -50,7 +50,10 @@ def install_man(d): outdir = os.path.split(outfilename)[0] os.makedirs(outdir, exist_ok=True) print('Installing %s to %s.' % (fullfilename, outdir)) - shutil.copyfile(fullfilename, outfilename) + if outfilename.endswith('.gz') and not fullfilename.endswith('.gz'): + open(outfilename, 'wb').write(gzip.compress(open(fullfilename, 'rb').read())) + else: + shutil.copyfile(fullfilename, outfilename) shutil.copystat(fullfilename, outfilename) def install_headers(d): -- cgit v1.1