From 484d36e931666cd149212abc00fafd8f55b79c32 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 16 Jan 2008 12:43:20 -0600 Subject: Check for existing files when copying to chroot Use basename when checking for files in the source array This allows us to actually check for pre-downloaded remote files and copy them to the build root as well. Original-work-by: Jaroslaw Swierczynski Signed-off-by: Aaron Griffin --- makechrootpkg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/makechrootpkg b/makechrootpkg index 425fbb9..120e70a 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -151,8 +151,9 @@ chown -R nobody "$uniondir/build" source PKGBUILD cp PKGBUILD "$uniondir/build/" for f in ${source[@]}; do - if [ -f "$f" ]; then - cp "$f" "$uniondir/build/" + basef=$(basename $f) + if [ -f "$basef" ]; then + cp "$basef" "$uniondir/build/" fi done if [ "$install" != "" -a -f "$install" ]; then -- cgit v1.2.3-70-g09d2