summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Lord <phillip.lord@russet.org.uk>2019-09-18 15:22:41 +0100
committerPhillip Lord <phillip.lord@russet.org.uk>2019-09-18 15:22:41 +0100
commit3082e0262a18d05d108f4528fff5d312e6cf0f47 (patch)
tree6bb4b10e4bc0d9fd63891d2731c0944b82b3dd5a
parent3c91cb34c469529c545e0cbd22e6979f25f1a670 (diff)
downloademacs-3082e0262a18d05d108f4528fff5d312e6cf0f47.tar.gz
Load src files from local if available
* admin/nt/dist-build/build-dep-zips.py
-rwxr-xr-xadmin/nt/dist-build/build-dep-zips.py20
1 files 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):