diff --git a/build/tests/CustomSystemUpdater/work/toaqua.rb b/build/tests/CustomSystemUpdater/work/toaqua.rb index bb33673b..4ee39077 100755 --- a/build/tests/CustomSystemUpdater/work/toaqua.rb +++ b/build/tests/CustomSystemUpdater/work/toaqua.rb @@ -27,17 +27,24 @@ REGION_DIR = { def proc(target_dir, output_dir) Find.find(target_dir){ |path| - next unless File.file?(path) && (/[a-z0-9A-Z]{4}-v[0-9]+\.tad\.out/ =~ path) != nil + next unless File.file?(path) && (/[a-z0-9A-Z]{4}-.*v[0-9]+\.tad\.out/ =~ path) != nil # p path src = path # ディレクトリ内のtadファイルの.tadより前を取り出す dest = "" + version = "" Find.find(File.split(src)[0]){|tad| - next unless (/.*\.tad\z/ =~ tad) != nil - #p tad - dest = File.split(tad)[1] + # .tad が見つかった + if (/.*\.tad\z/ =~ tad) != nil + dest = File.split(tad)[1] + end + if (/.*\.cls\z/ =~ tad) != nil + p tad + version = tad.slice(/v[0-9]+/) + end } + dest = /\.tad/.match(dest).pre_match + "-" + version + ".tad" # リージョンを判別してコピー regions = REGION_DIR[File.split(src)[1][3..3]] for region in regions do diff --git a/build/tests/CustomSystemUpdater/work/tocsu.sh b/build/tests/CustomSystemUpdater/work/tocsu.sh index 2fc503ab..376ae675 100755 --- a/build/tests/CustomSystemUpdater/work/tocsu.sh +++ b/build/tests/CustomSystemUpdater/work/tocsu.sh @@ -40,10 +40,10 @@ mkdir $tmp find ../$1 -name "*.out" -exec cp {} $tmp \; -find $tmp -name "*[jaJA]-v0*.out" | gawk -F/ '{printf("cp %s jp/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > jp.sh -find $tmp -name "*[uaUA]-v0*.out" | gawk -F/ '{printf("cp %s aus/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > aus.sh -find $tmp -name "*[paPA]-v0*.out" | gawk -F/ '{printf("cp %s euro/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > euro.sh -find $tmp -name "*[eaEA]-v0*.out" | gawk -F/ '{printf("cp %s usa/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > usa.sh +find $tmp -regex "[^/]*/...[jaJA].*" | gawk -F/ '{printf("cp %s jp/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > jp.sh +find $tmp -regex "[^/]*/...[uaUA].*" | gawk -F/ '{printf("cp %s aus/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > aus.sh +find $tmp -regex "[^/]*/...[paPA].*" | gawk -F/ '{printf("cp %s euro/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > euro.sh +find $tmp -regex "[^/]*/...[eaEA].*" | gawk -F/ '{printf("cp %s usa/%s\n",$0, $2)}' | sed -e 's/\.out$//g' > usa.sh ./jp.sh ./aus.sh