mirror of
https://github.com/9001/copyparty.git
synced 2026-04-02 03:00:05 -04:00
dist: strip some pointless code
This commit is contained in:
@@ -27,14 +27,14 @@ help() { exec cat <<'EOF'
|
||||
#
|
||||
# `no-ftp` saves ~30k by removing the ftp server, disabling --ftp
|
||||
#
|
||||
# `no-pf` saves ~12k by removing the option to download partyfuse
|
||||
#
|
||||
# `no-tfp` saves ~10k by removing the tftp server, disabling --tftp
|
||||
#
|
||||
# `no-zm` saves ~7k by removing the zeroconf mDNS server
|
||||
#
|
||||
# `no-smb` saves ~3.5k by removing the smb / cifs server
|
||||
#
|
||||
# `no-pf` saves ~2.8k by removing the option to download partyfuse
|
||||
#
|
||||
# _____________________________________________________________________
|
||||
# web features:
|
||||
#
|
||||
@@ -109,7 +109,7 @@ pybin=$(command -v python3 || command -v python) || {
|
||||
|
||||
langs=
|
||||
use_gz=
|
||||
zopf=2560
|
||||
zopf=2000
|
||||
while [ ! -z "$1" ]; do
|
||||
case $1 in
|
||||
clean) clean=1 ; ;;
|
||||
|
||||
@@ -61,11 +61,21 @@ def uh2(fp):
|
||||
# remove expensive imports too
|
||||
lns = []
|
||||
on = True
|
||||
on2 = True
|
||||
for ln in cs.split("\n"):
|
||||
if ln.startswith("if True:"):
|
||||
on = False
|
||||
continue
|
||||
|
||||
if ln.endswith("# !rm.yes>"):
|
||||
on2 = False
|
||||
continue
|
||||
|
||||
if not on2:
|
||||
if ln.endswith("# !rm.no>"):
|
||||
on2 = True
|
||||
continue
|
||||
|
||||
if not on and (not ln.strip() or ln.startswith(" ")):
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user