]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2001-08-16 07:19:38 by doogie]
authordoogie <>
Thu, 16 Aug 2001 14:19:38 +0000 (06:19 -0800)
committerdoogie <>
Thu, 16 Aug 2001 14:19:38 +0000 (06:19 -0800)
Add $config_path and $lib_path at the top, and modify the code to use these
vars, instead of hard-coding the paths.

scripts/processall.in

index acd7dacc4c265576ac3dd7f861e2f801021d638c..9fd17761d2f3285aa7d16fb46c68f6ae0e92e84f 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: processall.in,v 1.5 2001/07/15 10:05:23 doogie Exp $
+# $Id: processall.in,v 1.6 2001/08/16 07:19:38 doogie Exp $
 #
 # Usage: processall
 #
@@ -8,11 +8,15 @@
 # Creates: incoming/E.nn
 # Stop;    process/stop
 
-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" );
 
 #open(DEBUG,">&4");
 
@@ -44,11 +48,11 @@ for (;;) {
     if ($id =~ m/^[RC]/) {
         print(STDOUT "[$nf] $id service ...") || die $!;
         defined($c=fork) || die $!;
-        if (!$c) { exec("/usr/lib/debbugs/service",$id); die $!; }
+        if (!$c) { exec("$lib_path/service",$id); die $!; }
     } elsif ($id =~ m/^[BMQFDU]/) {
         print(STDOUT "[$nf] $id process ...") || die $!;
         defined($c=fork) || die $!;
-        if (!$c) { exec("/usr/lib/debbugs/process",$id); die $!; }
+        if (!$c) { exec("$lib_path/process",$id); die $!; }
     } else {
         die "bad name $id";
     }