Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/makepkg.sh.in22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 96fe4004..da1cec85 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1344,15 +1344,21 @@ check_sanity() {
ret=1
fi
- if [[ $pkgver =~ [[:space:]:-] ]]; then
- error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
- ret=1
- fi
+ awk -F'=' '/^[[:space:]]*pkgver=/ { $1=""; print $0 }' "$BUILDFILE" |
+ while read i _; do
+ if [[ $i =~ [[:space:]:-] ]]; then
+ error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
+ return 1
+ fi
+ done || ret=1
- if [[ $pkgrel =~ [[:space:]-] ]]; then
- error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
- ret=1
- fi
+ awk -F'=' '/^[[:space:]]*pkgrel=/ { $1=""; print $0 }' "$BUILDFILE" |
+ while read i _; do
+ if [[ $i =~ [[:space:]-] ]]; then
+ error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
+ return 1
+ fi
+ done || ret=1
if [[ ! $epoch =~ ^[0-9]*$ ]]; then
error "$(gettext "%s must be an integer.")" "epoch"