From 3082e0262a18d05d108f4528fff5d312e6cf0f47 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Wed, 18 Sep 2019 15:22:41 +0100 Subject: [PATCH] Load src files from local if available * admin/nt/dist-build/build-dep-zips.py --- admin/nt/dist-build/build-dep-zips.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py index 64e31a79bb6..b0a999a1bf4 100755 --- a/admin/nt/dist-build/build-dep-zips.py +++ b/admin/nt/dist-build/build-dep-zips.py @@ -144,13 +144,19 @@ def gather_deps(deps, arch, directory): def download_source(tarball): - print("Downloading {}...".format(tarball)) - check_output_maybe( - "wget -a ../download.log -O {} {}/{}/download" - .format(tarball, SRC_REPO, tarball), - shell=True - ) - print("Downloading {}... done".format(tarball)) + print("Acquiring {}...".format(tarball)) + if os.path.exists("./emacs-src-old/{}".format(tarball)): + print("Copying {} from local".format(tarball)) + shutil.copyfile("./emacs-src-old/{}".format(tarball), + "./emacs-src/{}".format(tarball)) + else: + print("Downloading {}...".format(tarball)) + check_output_maybe( + "wget -a ../download.log -O {} {}/{}/download" + .format(tarball, SRC_REPO, tarball), + shell=True + ) + print("Downloading {}... done".format(tarball)) def gather_source(deps): -- 2.39.5