Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-30 10:31:49 -0400
committerDan McGee <dan@archlinux.org>2011-09-01 11:32:20 -0500
commit5bb2d2e0a0c9edf03273fc00aa9e3a5cdff13310 (patch)
treed987c2dc20f226d551f6ef7fef9892a2c0f393cf
parent35d8cc8bc8ae94fcdde1bc04a3276a73e41660ec (diff)
makepkg: read filenames in a while loop
Further improvments on 2ca27ab which will allow the changelog and install script files to contain whitespace. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 97f03783..a9daea4b 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1354,16 +1354,15 @@ create_srcpackage() {
local i
for i in 'changelog' 'install'; do
- local filelist=$(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
local file
- for file in $filelist; do
+ while read -r file; do
# evaluate any bash variables used
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}/"
fi
- done
+ done < <(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
done
local TAR_OPT
@@ -1534,16 +1533,15 @@ check_sanity() {
done
for i in 'changelog' 'install'; do
- local filelist=$(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
local file
- for file in $filelist; do
+ while read -r file; do
# evaluate any bash variables used
eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
if [[ ! -f $file ]]; then
error "$(gettext "%s file (%s) does not exist.")" "$i" "$file"
ret=1
fi
- done
+ done < <(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
done
local valid_options=1