summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-10-12 00:18:05 +0200
committerDan McGee <dan@archlinux.org>2010-10-14 06:29:27 +0200
commit93718046d79b58df4b90956d9fb4e2282071f62c (patch)
tree650248d1f956f446f35bb9fd84e9e55d6f917e0e
parent0d5fa576b3ed011d091b87d84b79db794b37320c (diff)
downloadpacman-93718046d79b58df4b90956d9fb4e2282071f62c.tar.gz
pacman-93718046d79b58df4b90956d9fb4e2282071f62c.tar.xz
Add epoch verification to makepkg
If defined, it must be an integer. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 136797a0..bdf63efa 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1207,6 +1207,11 @@ check_sanity() {
return 1
fi
+ if [[ ! $epoch =~ ^[0-9]*$ ]]; then
+ error "$(gettext "%s must be an integer.")" "epoch"
+ return 1
+ fi
+
if [[ $arch != 'any' ]]; then
if ! in_array $CARCH ${arch[@]}; then
if (( ! IGNOREARCH )); then