2
eval 'exec /usr/bin/env perl -S $0 ${1+"$@"}'
3
if $running_under_some_shell;
9
# Basically, the script translate the parameters from the spec file to options
10
# passed to the dblatex script
15
'TexInputs' => '--texinputs' ,
16
'PdfInputs' => '--pdfinputs' ,
17
'TexStyle' => '--style' ,
18
'TexPost' => '--texpost' ,
27
local($specs) = $_[0];
30
my $dirspecs = dirname($specs);
32
open(SPECS, "<$specs") || die "Cannot open $specs\n";
37
# first, remove the comments
38
@a = split('#', $line, 2);
40
# let's get the parameter key
41
($key = $a[0]) =~ s/^\s*([^:]*).*/$1/;
44
if (exists $specs_mapping{"$key"}) {
45
($p = $a[0]) =~ s/^\s*$key:\s*//;
47
if (($key =~ /TexInputs/) ||
48
($key =~ /PdfInputs/) ||
49
($key =~ /XslParam/) ||
51
if (not($p =~ /^\//)) {
55
$opt .= "$specs_mapping{$key} $p ";
62
$opt = specs2option($file);