diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-05-27 00:30:18 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-05-27 00:30:59 +0900 |
commit | 135c6a4b995f5858687942a2b60a26f007695b78 (patch) | |
tree | ad4a8d9ec7d5b4200843a587c9229d9b2f784d24 /tool/extlibs.rb | |
parent | f8e703e2b0c872301ab8f469ed62682d71c3f1c8 (diff) |
fiddle: need to update configure after updating config tools
Diffstat (limited to 'tool/extlibs.rb')
-rwxr-xr-x | tool/extlibs.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tool/extlibs.rb b/tool/extlibs.rb index 720f1c767d..8a9c5a8fd0 100755 --- a/tool/extlibs.rb +++ b/tool/extlibs.rb @@ -125,6 +125,15 @@ class ExtLibs end end + def do_exec(command, dir, dest) + dir = dir ? File.join(dest, dir) : dest + if $VERBOSE + $stdout.puts "running #{command.dump} under #{dir}" + $stdout.flush + end + system(command, chdir: dir) or raise "failed #{command.dump}" + end + def do_command(mode, dest, url, cache_dir, chksums) extracted = false base = /.*(?=\.tar(?:\.\w+)?\z)/ @@ -206,6 +215,13 @@ class ExtLibs do_patch(dest, patch, args) end next + elsif /^!\s*(?:chdir:\s*([^|\s]+)\|\s*)?(.*)/ =~ line + if extracted and (mode == :all or mode == :patch) + command = vars.expand($2.strip) + chdir = $1 and chdir = vars.expand(chdir) + do_exec(command, chdir, dest) + end + next elsif /->/ =~ line if extracted and (mode == :all or mode == :patch) link, file = $`.strip, $'.strip |