summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/makepkg.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index a4e71564..96fe4004 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1343,12 +1343,14 @@ check_sanity() {
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgbase"
ret=1
fi
- if [[ $pkgver =~ [:-] ]]; then
- error "$(gettext "%s is not allowed to contain colons or hyphens.")" "pkgver"
+
+ if [[ $pkgver =~ [[:space:]:-] ]]; then
+ error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
ret=1
fi
- if [[ $pkgrel != ${pkgrel//-/} ]]; then
- error "$(gettext "%s is not allowed to contain hyphens.")" "pkgrel"
+
+ if [[ $pkgrel =~ [[:space:]-] ]]; then
+ error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
ret=1
fi