2 ###############################################################################
9 A wrapper for running the following mig commands on the specified files:
21 Arguments take the form of --cmd--argument or --cmd--argument=value.
23 This form is NOT supported: --cmd--argument value
25 cmd must be substituted with either add, skip-iconv, clean, convert, or stage,
26 and determines which mig command to apply the argument toward.
30 B<mig-quick> [arguments...] <file1> [<file2> ...]
34 ###############################################################################
40 my $mig_bin = "$FindBin::Bin/";
41 use lib "$FindBin::Bin/";
44 my @files = grep {!/^--/} @ARGV;
45 my %pass_thru = ('add'=>[],'skip-iconv'=>[],'clean'=>[],'convert'=>[],'stage'=>[]);
46 foreach my $a (@ARGV) {
47 if ($a =~ /^--([a-z]+)-(.*)$/) {
48 $pass_thru{$1} = [] if ! defined $pass_thru{$1};
49 unshift @{ $pass_thru{$1} }, "--$2";
53 foreach my $file (@files) {
54 foreach my $cmd (('add','skip-iconv','clean','convert','stage')) {
55 print "mig $cmd $file " . (join ' ', @{ $pass_thru{$cmd} }) . "\n";
61 system(@MYARGV,@{ $pass_thru{$cmd} });