summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rwxr-xr-xsrc/tools/make_distribution_archives.py (renamed from scripts/make_distribution_archives.py)10
2 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ce36627d..c7d074ba0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2020-09-25 Werner Lemberg <wl@gnu.org>
+
+ Move `scripts/make_distribution_archives.py` to `src/tools`.
+
+ * scr/tools/scripts/make_distribution_archives.py: (_TOP_DIR,
+ _SCRIPT_DIR): Updated to new location.
+ (main): s/shutils.copyfile/shutils.copy/ to preserve file
+ permissions.
+ (main): Prefix source file paths with `git_dir` while copying files
+ to allow calls of the script from other places than the top-level
+ directory.
+
2020-09-24 Werner Lemberg <wl@gnu.org>
* src/cff/cffgload.c (cff_slot_load): Scale `vertBearingY`.
diff --git a/scripts/make_distribution_archives.py b/src/tools/make_distribution_archives.py
index f0ffe8169..f29eb128c 100755
--- a/scripts/make_distribution_archives.py
+++ b/src/tools/make_distribution_archives.py
@@ -11,8 +11,8 @@ import subprocess
import sys
import tempfile
-_SCRIPT_DIR = os.path.dirname(__file__)
-_TOP_DIR = os.path.abspath(os.path.join(_SCRIPT_DIR, ".."))
+_TOP_DIR = os.path.abspath(os.path.join(__file__, "..", "..", ".."))
+_SCRIPT_DIR = os.path.dirname(os.path.join(_TOP_DIR, "builds", "meson", ""))
def get_cmd_output(cmd, cwd=None):
@@ -135,7 +135,7 @@ def main():
dst_dir = os.path.dirname(dst)
if not os.path.exists(dst_dir):
os.makedirs(dst_dir)
- shutil.copyfile(src, dst)
+ shutil.copy(os.path.join(git_dir, src), dst)
# Run autogen.sh in directory.
subprocess.check_call(["/bin/sh", "autogen.sh"], cwd=tmp_src_dir)
@@ -146,7 +146,7 @@ def main():
# Copy config.guess and config.sub if possible!
if args.gnu_config_dir:
for f in ("config.guess", "config.sub"):
- shutil.copyfile(
+ shutil.copy(
os.path.join(args.gnu_config_dir, f),
os.path.join(tmp_src_dir, "builds", "unix", f),
)
@@ -196,7 +196,7 @@ def main():
freetype_tar + ".xz",
ftwinversion + ".zip",
):
- shutil.copyfile(
+ shutil.copy(
os.path.join(build_dir, f), os.path.join(args.output_dir, f)
)