money where my mouf is
git-svn-id: file:///home/svn/incoming/trunk@2688 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
5777ef8730
commit
2067f08051
|
@ -1,18 +1,16 @@
|
|||
#!/usr/bin/perl
|
||||
#!/usr/bin/perl -pi.bak
|
||||
use strict;
|
||||
|
||||
while(<STDIN>) {
|
||||
my $line = $_;
|
||||
s/require '(.*?)'/"require '" . waka($1) . "'"/ge;
|
||||
|
||||
if($line =~ /require '(.*?)'/) {
|
||||
my $required = $1;
|
||||
sub waka {
|
||||
my $required = shift;
|
||||
|
||||
my @pieces = split('/', $required);
|
||||
map { $_ = old_to_new($_) } @pieces;
|
||||
my $new = join('/', @pieces);
|
||||
my @pieces = split('/', $required);
|
||||
map { $_ = old_to_new($_) } @pieces;
|
||||
my $new = join('/', @pieces);
|
||||
|
||||
print "$required -> $new\n";
|
||||
}
|
||||
return $new;
|
||||
}
|
||||
|
||||
sub old_to_new {
|
||||
|
|
Loading…
Reference in New Issue