[autobuilder-helper,thud,23/40] scripts/run-config: Add support for local filesystem buildtools urls

Submitted by Richard Purdie on Sept. 10, 2020, 1:30 p.m. | Patch ID: 176345

Details

Message ID 20200910133035.2044355-23-richard.purdie@linuxfoundation.org
State New
Headers show

Commit Message

Richard Purdie Sept. 10, 2020, 1:30 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/run-config | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/scripts/run-config b/scripts/run-config
index b4f1d58..d4ff6b3 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -103,7 +103,10 @@  if bttarball:
             fileno = lf.fileno()
             fcntl.flock(fileno, fcntl.LOCK_EX)
             if not os.path.exists(btdlpath):
-                subprocess.check_call(["wget", "-O", btdlpath, bttarball])
+                if bttarball.startswith("/"):
+                    subprocess.check_call(["cp", bttarball, btdlpath])
+                else:
+                    subprocess.check_call(["wget", "-O", btdlpath, bttarball])
                 os.chmod(btdlpath, 0o775)
         subprocess.check_call(["bash", btdlpath, "-d", btdir, "-y"])
     btenv = glob.glob(btdir + "/environment-setup*")