blob: f46449b49530c4e1c8e0e74764b9bac2345cca91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/perl
use Text::Template;
system("[ -d target ] || mkdir target");
system("cp -pr css imgs target");
*Q::include = \&Text::Template::_load_text;
foreach my $file ( glob("*.html") ) {
warn "$file\n";
my $t = new Text::Template( TYPE=>'FILE', SOURCE=>$file );
open(TARGET,">target/$file") or die $!;
print TARGET $t->fill_in(PACKAGE=>'Q');
close TARGET or die $!;
}
|