]> git.eshelyaron.com Git - emacs.git/commitdiff
Load src files from local if available
authorPhillip Lord <phillip.lord@russet.org.uk>
Wed, 18 Sep 2019 14:22:41 +0000 (15:22 +0100)
committerPhillip Lord <phillip.lord@russet.org.uk>
Wed, 18 Sep 2019 14:22:41 +0000 (15:22 +0100)
* admin/nt/dist-build/build-dep-zips.py

admin/nt/dist-build/build-dep-zips.py

index 64e31a79bb68cc9cda594b030d4b7fc091af8c48..b0a999a1bf403f52959e38b57499413180e1427c 100755 (executable)
@@ -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):