From 6aaf71521521881f5e1c17fd4fbf691e85237ebc Mon Sep 17 00:00:00 2001 From: doogie <> Date: Thu, 16 Aug 2001 16:47:31 -0800 Subject: [PATCH] [project @ 2001-08-16 17:43:45 by doogie] Add $config_path and $lib_path at the top, and modify the code to use these vars, instead of hard-coding the paths. --- scripts/db2html.in | 13 ++++++++----- scripts/html-control.in | 18 +++++++++++------- scripts/html-install.in | 7 +++++-- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/scripts/db2html.in b/scripts/db2html.in index 8e21a52a..2f849f48 100755 --- a/scripts/db2html.in +++ b/scripts/db2html.in @@ -1,12 +1,15 @@ #!/usr/bin/perl -# $Id: db2html.in,v 1.6 2000/10/07 17:27:13 joy Exp $ +# $Id: db2html.in,v 1.7 2001/08/16 17:47:31 doogie Exp $ # usage: db2html [-diff] [-stampfile=] [-lastrun=] #load the necessary libraries/configuration -require('/etc/debbugs/config'); -require('/etc/debbugs/text'); -require('/usr/lib/debbugs/errorlib'); -$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'}; +$config_path = '/org/bugs.debian.org/etc'; +$lib_path = '/org/bugs.debian.org/scripts'; + +require("$config_path/config"); +require("$config_path/text"); +require("$lib_path/errorlib"); +$ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; #set current working directory chdir("$gSpoolDir") || die "chdir spool: $!\n"; diff --git a/scripts/html-control.in b/scripts/html-control.in index dafd69e3..ff53dc43 100755 --- a/scripts/html-control.in +++ b/scripts/html-control.in @@ -1,13 +1,17 @@ #!/usr/bin/perl -# $Id: html-control.in,v 1.6 2001/01/27 22:09:01 joy Exp $ +# $Id: html-control.in,v 1.7 2001/08/16 17:43:45 doogie Exp $ use POSIX; -require '/etc/debbugs/config'; -require '/usr/lib/debbugs/errorlib'; -$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'}; +$config_path = '/org/bugs.debian.org/etc'; +$lib_path = '/org/bugs.debian.org/scripts'; + +require("$config_path/config"); +require("$lib_path/errorlib"); +$ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; + chdir("$gSpoolDir") || die "chdir spool: $!\n"; -#push(@INC,'/usr/lib/debbugs'); +#push(@INC,"$lib_path"); &filelock("html.fcntl-lock"); @@ -74,9 +78,9 @@ END } close(MM) or nonawful("close html-data.mail: $!"); -runshell("/usr/lib/debbugs/db2html $args 2>&1 >html-data $gWebDir/db", +runshell("$lib_path/db2html $args 2>&1 >html-data $gWebDir/db", sub { &nonawful; }); -runshell("/usr/lib/debbugs/html-install $gWebDir/db &1",sub { &quit; }); +runshell("$lib_path/html-install $gWebDir/db &1",sub { &quit; }); #runshell("gzip -9 html-data 2>&1",sub { &quit; }); #runshell("btoa 2>&1 >html-data.mail",sub { &quit; }); #runshell('2>&1 '.join(' ',('/usr/lib/sendmail','-f'."$gMaintainerEmail")).' -oem -oi -t