X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Futilities.pm;h=ae16ce3dc92836f238ab8f04d54223c58371f567;hb=fc7bd73cf5e7f609d497e2166657f77a0bac7d41;hp=42dd6b547553b7a3775a51bb5ccf9f813e7b048f;hpb=4288b2a59959c1693bdbc7cbef849942b721c508;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/utilities.pm b/make/utilities.pm index 42dd6b547..ae16ce3dc 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -319,6 +319,15 @@ sub translate_functions($$) die "Developers should no longer use backticks in configuration macros. Please use exec() and eval() macros instead. Offending line: $line (In module: $module)"; } + if ($line =~ /if(gt|lt)\("(.+?)","(.+?)"\)/) { + chomp(my $result = `$2 2>/dev/null`); + if (($1 eq 'gt' && $result le $3) || ($1 eq 'lt' && $result ge $3)) { + $line = substr $line, 0, $-[0]; + } else { + $line =~ s/if$1\("$2","$3"\)//; + } + } + if ($line =~ /ifuname\(\!"(\w+)"\)/) { my $uname = $1;