Fix regex: Would otherwise return more values from grep (#9)

This commit is contained in:
Florian Leeber 2021-07-27 08:44:03 +02:00 committed by GitHub
parent ba7cea8389
commit 499ea58718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -325,7 +325,7 @@ for c in $CONFIGS_EQ;do
egreen "$c is already set correctly." egreen "$c is already set correctly."
continue continue
elif grep "^$lhs" "$FILE" >/dev/null;then elif grep "^$lhs" "$FILE" >/dev/null;then
cur=$(awk -F= '{ print $2 }' <(grep "$lhs" "$FILE")) cur=$(awk -F= '{ print $2 }' <(grep "^$lhs=" "$FILE"))
ered "$lhs is set, but to $cur not $rhs." ered "$lhs is set, but to $cur not $rhs."
if $write ; then if $write ; then
egreen "Setting $c correctly" egreen "Setting $c correctly"