fix(build): fix repo detection for special chars in package name

Currently we used grep -E, in a way that special characters in the
package name such as the '+' in 'ls++' also became part of the regex.

This commit switches this to become a literal string matching using awk.

Signed-off-by: Christian Heusel <christian@heusel.eu>
This commit is contained in:
Christian Heusel 2023-07-29 12:05:35 +02:00 committed by Levente Polyak
parent 9f7808c26e
commit f31ea3a48e
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ get_pacman_repo_from_pkgbuild() {
-S \
--print \
--print-format '%n %r' \
"${pkgnames[0]}" | grep -E "^${pkgnames[0]} " | awk '{print $2}'
"${pkgnames[0]}" | awk '$1=="'"${pkgnames[0]}"'"{print $2}'
)
lock_close 10