ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/include_html.pl
Revision: 1.2
Committed: Thu Sep 7 21:42:43 2006 UTC (17 years, 8 months ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Moved documents to doc/historic

File Contents

# Content
1 #!/usr/bin/perl
2
3 # basic
4
5 $in = $ARGV[0];
6 $out = $ARGV[1];
7 sub die {
8 $prog = $0;
9 print STDERR $prog.": ".$_[0]."\n";
10 exit(1);
11 }
12
13 open(FOUT,">".$out) || &die("cannot open ".$out);
14
15
16 sub include_file {
17 $in = shift;
18 local(*FIN);
19 open(FIN,"<".$in) || &die("cannot open ".$in);
20 while (<FIN>) {
21 if (/^<!--#include file="(.*)"-->$/) {
22 &include_file($1);
23 }
24 else {
25 print FOUT $_;
26 }
27 }
28 close(FIN);
29 }
30
31 &include_file($in);
32 close(FOUT);
33