Bugfix: browsedb.pl didn't parse file "bii_scripts.config" correctly.
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-bii_scripts/bin/browsedb.pl new-bii_scripts/bin/browsedb.pl
--- old-bii_scripts/bin/browsedb.pl 2022-09-28 10:55:55.308321876 +0200
+++ new-bii_scripts/bin/browsedb.pl 2022-09-28 10:55:55.312321975 +0200
@@ -7354,15 +7354,18 @@
}
open(my $fh, '<:encoding(UTF-8)', $filename)
or die "Could not open file '$filename' $!";
- my $TOP= dirname("$FindBin::RealBin");
while (my $line = <$fh>)
{
chomp $line;
+ if ($Line=~/^\s*#/)
+ { next; }
if ($line!~/([^=]+)=(.*)/)
{ next; }
my $name= $1;
my $val= $2;
- $val=~ s/\$TOP\b/$TOP/g;
+ # recipe for environment replacement from:
+ # https://unix.stackexchange.com/questions/294835/replace-environment-variables-in-a-file-with-their-actual-values
+ $val=~ s{\$(\{)?(\w+)(?(1)\})}{$ENV{$2} // $&}ge;
$bii_config{$name}= $val;
}
close $fh;
patch c531b66332997fbefc0b81dc7f35e3994a920b7a
Author: Goetz Pfeiffer <Goetz.Pfeiffer@helmholtz-berlin.de>
Date: Mon Jun 27 09:25:00 CEST 2022
* Bugfix: browsedb.pl didn't parse file "bii_scripts.config" correctly.
Now all environment variables in bii_scripts.config are replaced, not just
variable '$TOP'