Skip to content

Commit

Permalink
* always compress, not just if we're not minifying
Browse files Browse the repository at this point in the history
* delete existing file so we can create the symlinks

git-svn-id: https://xpra.org/svn/Xpra/trunk@16056 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 12, 2017
1 parent aab769b commit b39c705
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,8 @@ def install_html5(install_dir="www"):
if install_dir==".":
install_dir = os.getcwd()
dst = os.path.join(install_dir, f)
if os.path.exists(dst):
os.unlink(dst)
#try to find an existing installed library and symlink it:
symlink_options = symlinks.get(os.path.basename(f), [])
for symlink_option in symlink_options:
Expand Down Expand Up @@ -1074,24 +1076,23 @@ def install_html5(install_dir="www"):
if r!=0:
shutil.copyfile(src, dst)
os.chmod(dst, 0o644)
if ftype not in ("png", ):
if html5_gzip_ENABLED:
gzip_dst = "%s.gz" % dst
if os.path.exists(gzip_dst):
os.unlink(gzip_dst)
cmd = ["gzip", "-n", "-9", "-k", dst]
get_status_output(cmd)
if os.path.exists(gzip_dst):
os.chmod(gzip_dst, 0o644)
if html5_brotli_ENABLED:
br_dst = "%s.br" % dst
if os.path.exists(br_dst):
os.unlink(br_dst)
cmd = ["bro", "--input", dst, "--output", br_dst]
get_status_output(cmd)
if os.path.exists(br_dst):
os.chmod(br_dst, 0o644)

if ftype not in ("png", ):
if html5_gzip_ENABLED:
gzip_dst = "%s.gz" % dst
if os.path.exists(gzip_dst):
os.unlink(gzip_dst)
cmd = ["gzip", "-f", "-n", "-9", "-k", dst]
get_status_output(cmd)
if os.path.exists(gzip_dst):
os.chmod(gzip_dst, 0o644)
if html5_brotli_ENABLED:
br_dst = "%s.br" % dst
if os.path.exists(br_dst):
os.unlink(br_dst)
cmd = ["bro", "--input", dst, "--output", br_dst]
get_status_output(cmd)
if os.path.exists(br_dst):
os.chmod(br_dst, 0o644)


#*******************************************************************************
Expand Down

0 comments on commit b39c705

Please sign in to comment.