From: Frantisek Sumsal Date: Thu, 17 Jun 2021 12:38:21 +0000 (+0200) Subject: test: drop the mawk-incompatible expression X-Git-Tag: v249-rc2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29bff80b5c5a3146c9073d16d80b24d8584934a2;p=thirdparty%2Fsystemd.git test: drop the mawk-incompatible expression The three-argument match() is a GNU AWK extension, thus breaking the compatibility with mawk (used on Ubuntu/Debian, for example). Let's replace it with a (hopefully) more portable sed expression to drop the inadvertently introduced gawk dependency. Fixes: #19957 --- diff --git a/test/test-functions b/test/test-functions index a82e9f73e8c..b154ace393b 100644 --- a/test/test-functions +++ b/test/test-functions @@ -2036,7 +2036,7 @@ inst_rule_programs() { local rule="${1:?}" local prog bin - awk 'match($0, /PROGRAM==?"([^ "]+)/, m) { print m[1]; }' "$rule" | while read -r prog; do + sed -rn 's/^.*?PROGRAM==?"([^ "]+).*$/\1/p' "$rule" | while read -r prog; do if [ -x "/lib/udev/$prog" ]; then bin="/lib/udev/$prog" else