source: projects/mondorescue/pbconf/branches/2.2.6/mondo/pbinit @ 418

Last change on this file since 418 was 418, checked in by Bruno Cornec, 12 years ago
  • Adapt pbinit to new pb 0.9.2 and its external functions for mondorescue
  • First attempt to have correct deb build again for pb 0.9.2
  • Property svn:executable set to *
File size: 1.6 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
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";
22my $pbproj = "PBPROJ";
23
24# Action needs to be pbinit
25my ($filteredfiles, $supfiles, $defpkgdir, $extpkgdir) = pb_env_init($pbproj,undef,"pbinit");
26my ($scheme,$uri) = pb_cms_init(undef);
27
28pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondoarchive.8","docs/mantmp");
29pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondorestore.8","docs/mantmp");
30pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/images","docs/en/images");
31pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/fdl.sgml","docs/en");
32pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondorescue-howto.sgml","docs/entmp");
33pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/mondorescue-howto.dsl","docs/en");
34pb_cms_export($uri,"$ENV{'PBDIR'}/mondo-doc/Makefile.howto","docs/en");
35# should call filter_file here
36
37my $ptr = pb_get_filters($pbpkg);
38foreach my $f (<docs/mantmp/*>) {
39    pb_filter_file("$f",$ptr,"docs/man/".basename($f),$pbpkg,$pbver,$pbtag,$pbrev,"","",$pbproj);
40}
41foreach my $f (<docs/entmp/*>) {
42    pb_filter_file("$f",$ptr,"docs/en/".basename($f),$pbpkg,$pbver,$pbtag,$pbrev,"","",$pbproj);
43}
44pb_rm_rf("docs/entmp");
45pb_rm_rf("docs/mantmp");
46
47system("cd docs/en ; make -f Makefile.howto mondorescue-howto.pdf mondorescue-howto.html");
Note: See TracBrowser for help on using the repository browser.