diff options
author | Allan McRae <allan@archlinux.org> | 2011-10-08 11:38:01 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-10-11 02:05:22 +0200 |
commit | 36f31dd133a6833f641823c3e3c12b0c0edca877 (patch) | |
tree | 4fd664a1f84e7370d87b5500563dde9aae9c2708 | |
parent | cc13f4753211599f1579a714f41f55a8c5d99081 (diff) | |
download | pacman-36f31dd133a6833f641823c3e3c12b0c0edca877.tar.gz pacman-36f31dd133a6833f641823c3e3c12b0c0edca877.tar.xz |
makepkg: strip comments after pkgver/pkgrel when checking value
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@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | 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 84221d0f..50cf2725 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 |