diff options
author | Allan McRae <allan@archlinux.org> | 2011-07-22 12:37:25 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-07-27 12:44:59 -0500 |
commit | 00949db191d0f31add4919ae56ebdfef9813a90e (patch) | |
tree | b7e412da9e9a74264855689305c77abe9971c20b /scripts/makepkg.sh.in | |
parent | 06974ebf2f6674baf01da79be9658277cbf2650e (diff) | |
download | pacman-00949db191d0f31add4919ae56ebdfef9813a90e.tar.xz |
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 <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r-- | 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 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 |