source: projects/mondorescue/pbconf/branches/2.2.5/mondo/pbinit @ 410

Last change on this file since 410 was 410, checked in by bruno, 11 years ago
  • preparation for 0.9.1
  • Update of pbinit files for mondo to support the new interface of pb_filter functions
  • 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 qw (pb_mkdir_p pb_rm_rf);
8use ProjectBuilder::Filter qw (pb_filter_file pb_get_filters);
9use ProjectBuilder::CMS qw (pb_cms_init pb_cms_export);
10use File::Basename;
11
12
13system("./bootstrap");
14pb_mkdir_p("docs/entmp");
15pb_mkdir_p("docs/mantmp");
16pb_mkdir_p("docs/en");
17pb_mkdir_p("docs/man");
18my $pbpkg = "PBPKG";
19my $pbver = "PBVER";
20my $pbtag = "PBTAG";
21my $pbrev = "PBREV";
22
23my ($scheme,$uri) = pb_cms_init(undef);
24
25pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondoarchive.8","docs/mantmp");
26pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondorestore.8","docs/mantmp");
27pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/images","docs/en/images");
28pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/fdl.sgml","docs/en");
29pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondorescue-howto.sgml","docs/entmp");
30pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondorescue-howto.dsl","docs/en");
31pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/Makefile.howto","docs/en");
32# should call filter_file here
33
34my $ptr = pb_get_filters($pbpkg);
35foreach my $f (<docs/mantmp/*>) {
36    pb_filter_file("$f",$ptr,"docs/man/".basename($f),$pbpkg,$pbver,$pbtag,$pbrev,"","");
37}
38foreach my $f (<docs/entmp/*>) {
39    pb_filter_file("$f",$ptr,"docs/en/".basename($f),$pbpkg,$pbver,$pbtag,$pbrev,"","");
40}
41pb_rm_rf("docs/entmp");
42pb_rm_rf("docs/mantmp");
43
44system("cd docs/en ; make -f Makefile.howto mondorescue-howto.pdf mondorescue-howto.html");
Note: See TracBrowser for help on using the repository browser.