X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=mig-bin%2Fmig-quick;fp=mig-bin%2Fmig-quick;h=0000000000000000000000000000000000000000;hp=59b08437542e8d84a534dc6f5d48c01fd522f1e1;hb=155eb9eac077ca803f75d1295e584e7012e1b883;hpb=69588457ab8f70fbb77af29cc0653933d24ed2ac diff --git a/mig-bin/mig-quick b/mig-bin/mig-quick deleted file mode 100755 index 59b0843..0000000 --- a/mig-bin/mig-quick +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -w -############################################################################### -=pod - -=head1 NAME - -mig-quick - -A wrapper for running the following mig commands on the specified files: - -=over 15 - -mig add -mig skip-iconv -mig clean -mig convert -mig stage - -=back - -Arguments take the form of --cmd--argument or --cmd--argument=value. - -This form is NOT supported: --cmd--argument value - -cmd must be substituted with either add, skip-iconv, clean, convert, or stage, -and determines which mig command to apply the argument toward. - -=head1 SYNOPSIS - -B [arguments...] [ ...] - -=cut - -############################################################################### - -use strict; -use Pod::Usage; -use Cwd 'abs_path'; -use FindBin; -my $mig_bin = "$FindBin::Bin/"; -use lib "$FindBin::Bin/"; -use Mig; - -my @files = grep {!/^--/} @ARGV; -my %pass_thru = ('add'=>[],'skip-iconv'=>[],'clean'=>[],'convert'=>[],'stage'=>[]); -foreach my $a (@ARGV) { - if ($a =~ /^--([a-z]+)-(.*)$/) { - $pass_thru{$1} = [] if ! defined $pass_thru{$1}; - unshift @{ $pass_thru{$1} }, "--$2"; - } -} - -foreach my $file (@files) { - foreach my $cmd (('add','skip-iconv','clean','convert','stage')) { - print "mig $cmd $file " . (join ' ', @{ $pass_thru{$cmd} }) . "\n"; - my @MYARGV = ( - 'mig' - ,$cmd - ,$file - ); - system(@MYARGV,@{ $pass_thru{$cmd} }); - } -} - -exit 0; -