Bugfix: browsedb.pl didn't parse file "bii_scripts.config" correctly.
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'.
hunk ./bin/browsedb.pl 7357
- my $TOP= dirname("$FindBin::RealBin");
hunk ./bin/browsedb.pl 7360
+ if ($Line=~/^\s*#/)
+ { next; }
hunk ./bin/browsedb.pl 7366
- $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;