summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-23 02:50:17 +0200
committerDan McGee <dan@archlinux.org>2011-09-01 18:32:14 +0200
commit35d8cc8bc8ae94fcdde1bc04a3276a73e41660ec (patch)
tree01a7e396b9366839f3321a03505b503119d869a0 /scripts
parent50f53b293c0ff823065e7a98d288787ca7bd4ba9 (diff)
downloadpacman-35d8cc8bc8ae94fcdde1bc04a3276a73e41660ec.tar.gz
pacman-35d8cc8bc8ae94fcdde1bc04a3276a73e41660ec.tar.xz
makepkg: fix breakage in eval'ing quoted strings
Broken in 2ca27a by me, trying to fix another problem. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d0a514a6..97f03783 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1358,7 +1358,7 @@ create_srcpackage() {
local file
for file in $filelist; do
# evaluate any bash variables used
- eval file=\"${file}\"
+ eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
if [[ ! -f "${srclinks}/${pkgbase}/$file" ]]; then
msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file}"
ln -s "${startdir}/$file" "${srclinks}/${pkgbase}/"
@@ -1451,7 +1451,7 @@ check_sanity() {
awk -F'=' '/^[[:space:]]*pkgver=/ { $1=""; print $0 }' "$BUILDFILE" |
while read i _; do
- eval i=\"$i\"
+ eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i =~ [[:space:]:-] ]]; then
error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
return 1
@@ -1460,7 +1460,7 @@ check_sanity() {
awk -F'=' '/^[[:space:]]*pkgrel=/ { $1=""; print $0 }' "$BUILDFILE" |
while read i _; do
- eval i=\"$i\"
+ eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i =~ [[:space:]-] ]]; then
error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
return 1
@@ -1469,7 +1469,7 @@ check_sanity() {
awk -F'=' '/^[[:space:]]*epoch=/ { $1=""; print $0 }' "$BUILDFILE" |
while read i _; do
- eval i=\"$i\"
+ eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ ! $i =~ ^[0-9]*$ ]]; then
error "$(gettext "%s must be an integer.")" "epoch"
return 1
@@ -1538,7 +1538,7 @@ check_sanity() {
local file
for file in $filelist; do
# evaluate any bash variables used
- eval file=\"${file}\"
+ eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
if [[ ! -f $file ]]; then
error "$(gettext "%s file (%s) does not exist.")" "$i" "$file"
ret=1