File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
lib/ruby_wasm/build_system/product Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,8 @@ def fetch
23
23
case @params [ :type ]
24
24
when "github"
25
25
repo_url = "https://github.com/#{ @params [ :repo ] } .git"
26
- FileUtils . mkdir_p src_dir
27
- system "git init" , chdir : src_dir
28
- system "git remote add origin #{ repo_url } " , chdir : src_dir
29
- system "git fetch --depth 1 origin #{ @params [ :rev ] } " , chdir : src_dir
30
- system "git checkout #{ @params [ :rev ] } " , chdir : src_dir
26
+ system "git clone --depth 1 -b #{ @params [ :rev ] } #{ repo_url } #{ src_dir } " or
27
+ raise "failed to clone #{ repo_url } "
31
28
when "local"
32
29
FileUtils . mkdir_p File . dirname ( src_dir )
33
30
FileUtils . cp_r @params [ :src ] , src_dir
@@ -43,8 +40,9 @@ def build
43
40
fetch unless File . exist? ( src_dir )
44
41
unless File . exist? ( configure_file )
45
42
Dir . chdir ( src_dir ) do
46
- system "ruby tool/downloader.rb -d tool -e gnu config.guess config.sub"
47
- system "./autogen.sh"
43
+ system "ruby tool/downloader.rb -d tool -e gnu config.guess config.sub" or
44
+ raise "failed to download config.guess and config.sub"
45
+ system "./autogen.sh" or raise "failed to run autogen.sh"
48
46
end
49
47
end
50
48
end
You can’t perform that action at this time.
0 commit comments