Mercurial > spc_convert
diff convert.pl @ 6:a012d31df380
Made convert.pl work in parallel. Restored files in less than 2 minutes!
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 21 Oct 2011 07:23:22 -0700 |
parents | b6e64e348e47 |
children |
line wrap: on
line diff
1.1 --- a/convert.pl Fri Oct 21 07:12:40 2011 -0700 1.2 +++ b/convert.pl Fri Oct 21 07:23:22 2011 -0700 1.3 @@ -277,14 +277,20 @@ 1.4 FF.spc); 1.5 1.6 1.7 +`mkdir ./output`; 1.8 + 1.9 for (0..$#targets){ 1.10 1.11 - 1.12 - $command = "./build/spc_convert -s 100" . " -i ./test-files/" . $sources[$_] . 1.13 - " -o ./output/" . $targets[$_]; 1.14 - print "$command\n"; 1.15 - 1.16 - `$command`; 1.17 - 1.18 + my $pid = fork(); 1.19 + 1.20 + if ($pid == 0) { 1.21 + 1.22 + $command = "./build/spc_convert -s 100" . " -i ./test-files/" . 1.23 + $sources[$_] . " -o ./output/" . $targets[$_]; 1.24 + print "$command\n"; 1.25 + 1.26 + `$command`; 1.27 + exit(0); 1.28 + } 1.29 } 1.30