summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-30 11:01:37 -0400
committerDan McGee <dan@archlinux.org>2011-09-01 11:32:26 -0500
commitcf1f0143935fe62ebb568202ff83ba2de0815995 (patch)
tree11da613da3817f88d4f6f13cc9801161385a1675
parent5bb2d2e0a0c9edf03273fc00aa9e3a5cdff13310 (diff)
downloadpacman-cf1f0143935fe62ebb568202ff83ba2de0815995.tar.xz
makepkg: fix sanity checking in versioning
Read the entire variable, respecting escapes, which are necessary to retain for the successive eval. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index a9daea4b..e74e5c81 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1449,7 +1449,7 @@ check_sanity() {
fi
awk -F'=' '/^[[:space:]]*pkgver=/ { $1=""; print $0 }' "$BUILDFILE" |
- while read i _; do
+ while read -r i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i =~ [[:space:]:-] ]]; then
error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
@@ -1458,7 +1458,7 @@ check_sanity() {
done || ret=1
awk -F'=' '/^[[:space:]]*pkgrel=/ { $1=""; print $0 }' "$BUILDFILE" |
- while read i _; do
+ while read -r i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i =~ [[:space:]-] ]]; then
error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
@@ -1467,7 +1467,7 @@ check_sanity() {
done || ret=1
awk -F'=' '/^[[:space:]]*epoch=/ { $1=""; print $0 }' "$BUILDFILE" |
- while read i _; do
+ while read -r i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ ! $i =~ ^[0-9]*$ ]]; then
error "$(gettext "%s must be an integer.")" "epoch"