From 00949db191d0f31add4919ae56ebdfef9813a90e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Fri, 22 Jul 2011 12:37:25 +1000 Subject: makepkg: pkgver and pkgrel can not have whitespace There is always someone who tries to break things (cough *Dave* cough...) Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3-24-g4f1b