summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Heusel <christian@heusel.eu>2023-07-29 12:05:35 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-08-27 17:08:23 +0200
commitf31ea3a48ebea33f85bcd682c72848cadebb7ad1 (patch)
tree167d1be3fdd3d40ec5b22068fb7c6e743035f9bc /src
parent9f7808c26e4270370bb878de56004ddda49b7ce9 (diff)
downloaddevtools-f31ea3a48ebea33f85bcd682c72848cadebb7ad1.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/lib/util/pacman.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/util/pacman.sh b/src/lib/util/pacman.sh
index f6c2d5f..541147c 100644
--- a/src/lib/util/pacman.sh
+++ b/src/lib/util/pacman.sh
@@ -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