There is always someone who tries to break things (cough *Dave* cough...) Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 0682e4f..ec5b388 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1438,12 +1438,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 -- 1.7.6