From a06ac2451a73744f6e4bb2b895719d2c3ad588e3 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 31 Oct 2011 12:43:16 +0100 Subject: makechrootpkg: Handle install and changelog file the same way as in commitpkg --- makechrootpkg.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index ba893bf..b172bdf 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -243,12 +243,12 @@ cp PKGBUILD "$copydir/build/" done # Find all changelog and install files, even inside functions - for i in changelog install; do - sed -n "s/^[[:space:]]*$i=//p" PKGBUILD | while IFS= read -r file; do + for i in 'changelog' 'install'; do + while read -r file; do # evaluate any bash variables used - eval file="$file" + eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\" [[ -f $file ]] && cp "$file" "$copydir/build/" - done + done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD) done ) -- cgit v1.2.3-70-g09d2