From ecca293cd0b8368b0783ba5b7ed01e31cf875b35 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 27 Apr 2016 01:35:17 +0200 Subject: [PATCH] Use tar.xz instead of tar.gz --- scripts/build.py | 2 +- scripts/make_release.py | 14 +++++++------- scripts/make_src.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/build.py b/scripts/build.py index a06338bc9..a8e62c17c 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -282,7 +282,7 @@ if flag_make_release: bail("failed to make a relase of %s" % name) final_output = "FAIL" for f in os.listdir("."): - if version_teeworlds in f and platform in f and name in f and (".zip" in f or ".tar.gz" in f): + if version_teeworlds in f and platform in f and name in f and (".zip" in f or ".tar.xz" in f): final_output = f os.chdir(work_dir) shutil.copy("%s/%s" % (src_dir_teeworlds, final_output), "../"+final_output) diff --git a/scripts/make_release.py b/scripts/make_release.py index fcba319d3..c5084619e 100644 --- a/scripts/make_release.py +++ b/scripts/make_release.py @@ -12,7 +12,7 @@ version = sys.argv[1] platform = sys.argv[2] exe_ext = "" use_zip = 0 -use_gz = 1 +use_xz = 1 use_dmg = 0 use_bundle = 0 include_data = True @@ -24,7 +24,7 @@ if platform == "src": include_exe = False include_src = True use_zip = 1 - use_gz = 1 + use_xz = 1 #if not platform in valid_platforms: # print("not a valid platform") @@ -34,10 +34,10 @@ if platform == "src": if platform == 'win32' or platform == 'win64': exe_ext = ".exe" use_zip = 1 - use_gz = 0 + use_xz = 0 if platform == 'osx': use_dmg = 1 - use_gz = 0 + use_xz = 0 use_bundle = 1 def copydir(src, dst, excl=[]): @@ -211,9 +211,9 @@ if use_zip: #zf.printdir() zf.close() -if use_gz: - print("making tar.gz archive") - os.system("tar czf %s.tar.gz %s" % (package, package_dir)) +if use_xz: + print("making tar.xz archive") + os.system("XZ_OPT=-9 tar cJf %s.tar.xz %s" % (package, package_dir)) if use_dmg: print("making disk image") diff --git a/scripts/make_src.py b/scripts/make_src.py index 33e0f921c..33785c9a6 100644 --- a/scripts/make_src.py +++ b/scripts/make_src.py @@ -37,5 +37,5 @@ if 1: os.system("python scripts/make_release.py %s src" % version) os.chdir(root_dir) for f in os.listdir("teeworlds"): - if "teeworlds" in f and "src" in f and (".zip" in f or ".tar.gz" in f): + if "teeworlds" in f and "src" in f and (".zip" in f or ".tar.xz" in f): shutil.copy("teeworlds/"+f, "../" + f)