Commit 7a9f808a authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig) Committed by Lukas Fleischer
Browse files

makechrootpkg: Source PKGBUILD only once

parent b9070bf0
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -219,8 +219,9 @@ eval $(grep '^CARCH=' "$copydir/etc/makepkg.conf")
export CARCH

# Copy PKGBUILD and sources
source=( $(source PKGBUILD; echo ${source[@]}) )
cp PKGBUILD "$copydir/build/"
(
	source PKGBUILD
	for file in "${source[@]}"; do
		file="${file%%::*}"
		file="${file##*://*/}"
@@ -231,8 +232,7 @@ for file in "${source[@]}"; do
		fi
	done

(
	source PKGBUILD
	# 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
			# evaluate any bash variables used