scripts for local updates of animals
[buildfarm-server.git] / scripts / delete_unlisted_branches.pl
index fd37fd2337a8781d2c4256202b1a1525c7392c83..2ded4fbf6c0a0489a983c5fbbb5835f02018b847 100755 (executable)
@@ -7,7 +7,9 @@ use Data::Dumper;
 
 use vars qw($dbhost $dbname $dbuser $dbpass $dbport
 );
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
 
 die "no dbname" unless $dbname;
 die "no dbuser" unless $dbuser;
@@ -21,7 +23,7 @@ my $db = DBI->connect($dsn,$dbuser,$dbpass);
 die $DBI::errstr unless $db;
 
 my ($brhandle,@branches_of_interest);
-if (open($brhandle,"$ENV{BFConfDir}/htdocs/branches_of_interest.txt"))
+if (open($brhandle,"$RealBin/../htdocs/branches_of_interest.txt"))
 {
     @branches_of_interest = <$brhandle>;
     close($brhandle);