aboutsummaryrefslogtreecommitdiff
path: root/builder_install.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-02-10 21:12:15 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-02-10 21:12:15 +0200
commit75dbc2abdb4103a59a7b348b29fc5b48da7e9012 (patch)
tree0af8bfb98405fbe8ce86797015bdab813c6d0dcb /builder_install.py
parent399c2104fe775932877adb261eb0f9c177ff6677 (diff)
downloadmeson-75dbc2abdb4103a59a7b348b29fc5b48da7e9012.zip
meson-75dbc2abdb4103a59a7b348b29fc5b48da7e9012.tar.gz
meson-75dbc2abdb4103a59a7b348b29fc5b48da7e9012.tar.bz2
Compress man files.
Diffstat (limited to 'builder_install.py')
-rwxr-xr-xbuilder_install.py5
1 files changed, 4 insertions, 1 deletions
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):