[pacman-dev] [PATCH] makepkg: strip comments after pkgver/pkgrel when checking value
Allan McRae
allan at archlinux.org
Sun Oct 9 23:54:19 EDT 2011
Inline comments after pkgver or pkgrel would cause the sanity
checks to fail so remove them before checking the value.
Signed-off-by: Allan McRae <allan at archlinux.org>
---
scripts/makepkg.sh.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 84221d0..50cf272 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1448,7 +1448,7 @@ check_sanity() {
ret=1
fi
- awk -F'=' '$1 ~ /^[[:space:]]*pkgver$/' "$BUILDFILE" |
+ awk -F'=' '$1 ~ /^[[:space:]]*pkgver$/' "$BUILDFILE" | sed "s/[[:space:]]*#.*//" |
while IFS='=' read -r _ i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i = *[[:space:]:-]* ]]; then
@@ -1457,7 +1457,7 @@ check_sanity() {
fi
done || ret=1
- awk -F'=' '$1 ~ /^[[:space:]]*pkgrel$/' "$BUILDFILE" |
+ awk -F'=' '$1 ~ /^[[:space:]]*pkgrel$/' "$BUILDFILE" | sed "s/[[:space:]]*#.*//" |
while IFS='=' read -r _ i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i = *[[:space:]-]* ]]; then
--
1.7.7
More information about the pacman-dev
mailing list