星期日, 12月 10, 2006

test note

modify koha 2.2.7 & koha rel_2_2
add File::Find (perl 5.8.8)
file.pl

#!/usr/bin/perl

use File::Find;

find(\&wanted,'/usr/local/koha/opac/cgi-bin');

sub wanted{
if(/.pl/){
print $File::Find::name . "\n";
system("/bin/sed -f /usr/local/koha/opac/cgi-bin/insert.text $File::Find::name > $File::Find::name.t");
system("/usr/bin/rm -rf $File::Find::name");
# system("/usr/bin/rename '\s/.t$//' *.t");
}
# system("/usr/bin/rename '\s/$File::Find::name$//' *.t");
}

insert.text

/#!\/usr\/bin\/perl/c#!/usr/bin/perl use lib '/usr/local/koha/intranet/modules';


chmod -R 0755 tmp
chown -R apache owner

沒有留言: