diff options
author | Werner Lemberg <wl@gnu.org> | 2020-09-25 07:22:08 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2020-09-25 08:07:43 +0200 |
commit | e8ee98e669c25d0b8e67cdaace9a6b7e49c7a0c0 (patch) | |
tree | 86b6db305dc519da8a6d83714c4c13784f5709f6 | |
parent | 4f13a43ab32ba77793d8528d4b4c057c6f76b835 (diff) | |
download | freetype2-e8ee98e669c25d0b8e67cdaace9a6b7e49c7a0c0.tar.gz |
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.
-rw-r--r-- | ChangeLog | 12 | ||||
-rwxr-xr-x | src/tools/make_distribution_archives.py (renamed from scripts/make_distribution_archives.py) | 10 |
2 files changed, 17 insertions, 5 deletions
@@ -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) ) |