From: Phillip Lord Date: Wed, 18 Sep 2019 14:22:41 +0000 (+0100) Subject: Load src files from local if available X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3082e0262a18d05d108f4528fff5d312e6cf0f47;p=emacs.git Load src files from local if available * admin/nt/dist-build/build-dep-zips.py --- 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):