sgml2txt 1004 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/bin/perl 
#
#   sgmltools.in
#
#   $Id$
#
#   SGML-Tools driver. Calls all other SGML-Tools components, contains
#   configuration information, etcetera.
#
package main;

sub BEGIN 
{
  require 5.004;
}
use strict;

18
use vars qw($prefix $DataDir $BinDir $progs);
19

20 21
use FindBin;

22
$prefix = "/usr";
23
$DataDir = "$FindBin::Bin/sbase";
24 25
$BinDir = "/usr/bin";

26
use lib "/usr/share/linuxdoc-tools";
27 28
use lib "/usr/perl5";
use lib "/usr/lib/perl5";
29
use lib "/usr/share/perl5";
30 31 32 33
$progs = {
  "NSGMLS" => "/usr/bin/nsgmls",
  "SGMLSASP" => "/usr/bin/sgmlsasp",
  "GROFF" => "/usr/bin/groff",
34 35
  "GROFFMACRO" => "-ms",
  "AWK" => "/usr/share/linuxdoc-tools/awkwhich"
36
};
37 38
$ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog" .
  (defined $ENV{SGML_CATALOG_FILES} ? ":$ENV{SGML_CATALOG_FILES}" : "");
39

40
require "$FindBin::Bin/LinuxDocTools.pm";
41
&LinuxDocTools::init;
42

43
my @FileList = LinuxDocTools::process_options ("txt", @ARGV);
44 45
for my $curfile (@FileList)
  {
46
    LinuxDocTools::process_file ($curfile);
47 48 49
  }

exit 0;