makechrootpkg: Handle install and changelog file the same way as in commitpkg

This commit is contained in:
Pierre Schmitz 2011-10-31 12:43:16 +01:00
parent fbdcf6e309
commit a06ac2451a
1 changed files with 4 additions and 4 deletions

View File

@ -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
)