Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-02-15 00:01:45 -0500
committerDan McGee <dan@archlinux.org>2012-03-08 17:29:27 -0600
commit708a227578a8d27bb84dd150fec9c2ebc1afd117 (patch)
tree1289aa603b1caf15efffeb34882c3ca726870dcc /scripts
parent82abe079ab67bb39c6276105449a2d553bf31660 (diff)
makepkg: enforce decimal format for pkgrel
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 48f7f7ec..14e2f6a0 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1481,8 +1481,8 @@ check_sanity() {
awk -F'=' '$1 ~ /^[[:space:]]*pkgrel$/' "$BUILDFILE" | sed "s/[[:space:]]*#.*//" |
while IFS='=' read -r _ i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "${i%%+([[:space:]])}")\"
- if [[ $i = *[[:space:]-]* ]]; then
- error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
+ if [[ $i != +([0-9])?(.+([0-9])) ]]; then
+ error "$(gettext "%s must be a decimal.")" "pkgrel"
return 1
fi
done || ret=1