Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
517 | ligi | 1 | #!/usr/bin/env ruby |
2 | |||
3 | tmp_dir="wm_tmp" |
||
4 | |||
5 | p `./BUILD allwm #{tmp_dir}` #-0 |
||
6 | |||
7 | Dir["#{tmp_dir}/*.jar"].each { |jarname| |
||
8 | jarname.gsub!(tmp_dir+"/","") |
||
9 | jadname=jarname.gsub(".jar",".jad") |
||
10 | basename=jarname.split("-")[1] |
||
11 | p jarname + "--" + basename |
||
12 | p `cp -r res/wm_zip_base/ #{tmp_dir}/#{basename}` |
||
13 | p `mv #{tmp_dir}/#{jarname} #{tmp_dir}/#{basename}/bin` |
||
14 | p `mv #{tmp_dir}/#{jadname} #{tmp_dir}/#{basename}/bin` |
||
15 | |||
16 | args_content=File.read("#{tmp_dir}/#{basename}/etc/start.args") |
||
17 | args_content.gsub!("JARNAME",jarname) |
||
18 | ` rm #{tmp_dir}/#{basename}/etc/start.args ` |
||
19 | args_file=File.open("#{tmp_dir}/#{basename}/etc/start.args","w+") |
||
20 | args_file.puts args_content |
||
21 | args_file.close |
||
22 | |||
23 | |||
24 | FileUtils.chdir("#{tmp_dir}/#{basename}") |
||
25 | p `zip -r ../#{basename}.zip *` |
||
26 | FileUtils.chdir("..") |
||
27 | p `rm -rf #{basename}` |
||
28 | FileUtils.chdir("..") |
||
29 | } |