source: ProjectBuilder/projects/mondorescue/pbconf/branches/2.2.10/website/pbinit@ 809

Last change on this file since 809 was 649, checked in by Bruno Cornec, 15 years ago

adds p2v to the list of docs for mondo

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/usr/bin/perl -w
2#
3# Init script for mondo with Project-Builder
4#
5
6# Export documentation to generate what is needed
7use ProjectBuilder::Base;
8use ProjectBuilder::Filter;
9use ProjectBuilder::CMS;
10use ProjectBuilder::Env;
11use File::Basename;
12
13pb_mkdir_p("docs");
14my %pb;
15$pb{'pkg'} = "PBPKG";
16$pb{'ver'} = "PBVER";
17$pb{'tag'} = "PBTAG";
18$pb{'rev'} = "PBREV";
19$pb{'proj'} = "PBPROJ";
20$pb{'date'} = "PBDATE";
21$pb{'repo'} = "PBREPO";
22
23# Action needs to be pbinit
24my ($filteredfiles, $supfiles, $defpkgdir, $extpkgdir) = pb_env_init($pb{'proj'},undef,"pbinit");
25my ($scheme,$uri) = pb_cms_init(undef);
26
27foreach my $f ("mondoarchive.8", "mondorestore.8", "fdl.sgml", "mondorescue-howto.sgml", "mondorescue-howto.dsl", "Makefile.howto", "Makefile.man", "mindi.8", "HOWTO-_Deploy_Linux_from_SCSI_to_SATA.pdf", "hwmigration.pdf", "mondo-presentation-v1.pdf", "mondo-presentation-v2.pdf", "p2v.odt", "p2v.pdf") {
28 pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/$f","docs");
29}
30pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/images","docs/images");
31
32# call filter_file here
33my $ptr = pb_get_filters($pb{'pkg'});
34foreach my $f ((<docs/*.8>),(<docs/*.sgml>)) {
35 pb_filter_file_inplace($ptr,$f,\%pb);
36}
37
38system("cd docs ; make -f Makefile.howto ; make -f Makefile.man");
39
40# Fix man pages for Web usage
41foreach my $f (<docs/*.8.html>) {
42 my $content = pb_get_content($f);
43 $content =~ s~/man8/~/docs/~g;
44 $content =~ s~<A HREF[=./A-z0-9"]*/man1/[^<]*>([A-z0-9]*)</A>~$1~g;
45 $content =~ s~/index.html~/index.shtml~g;
46 pb_set_content($f,$content);
47 }
Note: See TracBrowser for help on using the repository browser.