From: Kirill Miazine Date: Fri, 4 Nov 2016 22:40:20 +0000 (+0100) Subject: Replace remaining paths with $RealBin. X-Git-Url: https://git.exim.org/buildfarm-server.git/commitdiff_plain/e44fe8aa50d2a7fd82cc923d11b7a57684d96d1b?ds=sidebyside Replace remaining paths with $RealBin. --- diff --git a/cgi-bin/envtest.pl b/cgi-bin/envtest.pl old mode 100644 new mode 100755 index 998ff07..8dbd6d9 --- a/cgi-bin/envtest.pl +++ b/cgi-bin/envtest.pl @@ -1,8 +1,11 @@ #!/usr/bin/perl +use FindBin qw($RealBin); +require "$RealBin/../BuildFarmWeb.pl"; + print "Content-Type: text/plain\n\n"; -print "Conf: /home/farm/server\n"; +print "Conf: $RealBin/../\n"; print `pwd`; diff --git a/cgi-bin/eximstatus.pl b/cgi-bin/eximstatus.pl index af68f10..df25467 100755 --- a/cgi-bin/eximstatus.pl +++ b/cgi-bin/eximstatus.pl @@ -33,7 +33,7 @@ use Storable qw(thaw); use FindBin qw($RealBin); require "$RealBin/../BuildFarmWeb.pl"; -my $buildlogs = "/home/farm/server/buildlogs"; +my $buildlogs = "$RealBin/../buildlogs"; die "no dbname" unless $dbname; die "no dbuser" unless $dbuser; diff --git a/scripts/delete_unlisted_branches.pl b/scripts/delete_unlisted_branches.pl index 2dba66c..2ded4fb 100755 --- a/scripts/delete_unlisted_branches.pl +++ b/scripts/delete_unlisted_branches.pl @@ -23,7 +23,7 @@ my $db = DBI->connect($dsn,$dbuser,$dbpass); die $DBI::errstr unless $db; my ($brhandle,@branches_of_interest); -if (open($brhandle,"/home/farm/server/htdocs/branches_of_interest.txt")) +if (open($brhandle,"$RealBin/../htdocs/branches_of_interest.txt")) { @branches_of_interest = <$brhandle>; close($brhandle); diff --git a/scripts/purge_old_logs.pl b/scripts/purge_old_logs.pl index ad267bd..f539f2f 100755 --- a/scripts/purge_old_logs.pl +++ b/scripts/purge_old_logs.pl @@ -37,7 +37,7 @@ my $del_recent_sth = $db->prepare(q[ $del_sth->execute(); $del_recent_sth->execute(); -my $buildlogs = "/home/farm/server/buildlogs"; +my $buildlogs = "$RealBin/../buildlogs"; my @dirs = `find $buildlogs -mindepth 1 -type d -ctime +95`; foreach my $dir (@dirs) {