genlink: properly escape regexp special characters

Fixes compatibility with mawk, as used on debian and ubuntu now.
This commit is contained in:
Torsten Raudssus 2015-01-13 18:43:28 +01:00 committed by Karl Palsson
parent 18e15c133d
commit 0cb1db0967

View File

@ -31,9 +31,9 @@ BEGIN {
gsub(/\r$/,"");
tmp = "^"$1"$";
gsub(/?/, ".", tmp);
gsub(/*/, ".*", tmp);
gsub(/+/, ".+", tmp);
gsub(/\?/, ".", tmp);
gsub(/\*/, ".*", tmp);
gsub(/\+/, ".+", tmp);
tolower(tmp);
if (PAT ~ tmp) {