From 2a6a3aedd0d61157b0807919412ea41a296043eb Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 12 May 2020 00:26:40 +0200 Subject: [PATCH] shrink sfx some more --- scripts/make-sfx.sh | 7 ++++--- scripts/sfx.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/make-sfx.sh b/scripts/make-sfx.sh index 3ac1547b..64e02789 100755 --- a/scripts/make-sfx.sh +++ b/scripts/make-sfx.sh @@ -71,7 +71,7 @@ cd sfx tar -zxf $f mv Jinja2-*/jinja2 . - rm -rf Jinja2-* jinja2/testsuite + rm -rf Jinja2-* jinja2/testsuite jinja2/tests.py # msys2 tar is bad, make the best of it echo collecting source @@ -123,8 +123,9 @@ done } # up2k goes from 28k to 22k laff -for f in copyparty/web/*.js; do - unexpand.exe -t 4 --first-only <"$f" >t +echo entabbening +find | grep -E '\.(js|css|html|py)$' | while IFS= read -r f; do + unexpand -t 4 --first-only <"$f" >t tmv "$f" done diff --git a/scripts/sfx.py b/scripts/sfx.py index 85dfa5b1..e5a3647e 100644 --- a/scripts/sfx.py +++ b/scripts/sfx.py @@ -260,7 +260,7 @@ def read_py(binp): def get_pys(): ver, chk = read_py(sys.executable) - if chk: + if chk or PY2: return [[chk, ver, sys.executable]] hits = {sys.executable.lower(): sys.executable}