summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_sources
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-08-07 19:45:24 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:37 +0100
commitb13a8381a4e5aaff43f7d2e2550bd2df20f23ceb (patch)
treeace8642e0ef6c2c03d6acf7ef7610daf1df9bba4 /helpers/lh_chroot_sources
parentb4c24e41366fa1dc20fabc5a295a022eb4d9018a (diff)
downloadlive-build-b13a8381a4e5aaff43f7d2e2550bd2df20f23ceb.zip
live-build-b13a8381a4e5aaff43f7d2e2550bd2df20f23ceb.tar.gz
Only using hardlinks for local-packages when hardlinks are possible.
Diffstat (limited to 'helpers/lh_chroot_sources')
-rwxr-xr-xhelpers/lh_chroot_sources9
1 files changed, 7 insertions, 2 deletions
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 4c763cb..9da2c0d 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -85,15 +85,20 @@ case "${1}" in
rm -rf chroot/root/local-packages
mkdir -p chroot/root/local-packages
+ if [ "$(stat --printf %d config/chroot_local-packages)" = "$(stat --printf %d chroot/root/local-packages)" ]
+ then
+ CP_OPTIONS="-l"
+ fi
+
# Copy packages
if ls config/chroot_local-packages/*_"${LH_ARCHITECTURE}".deb > /dev/null 2>&1
then
- cp -l config/chroot_local-packages/*_"${LH_ARCHITECTURE}".deb chroot/root/local-packages
+ cp ${CP_OPTIONS} config/chroot_local-packages/*_"${LH_ARCHITECTURE}".deb chroot/root/local-packages
fi
if ls config/chroot_local-packages/*_all.deb > /dev/null 2>&1
then
- cp -l config/chroot_local-packages/*_all.deb chroot/root/local-packages
+ cp ${CP_OPTIONS} config/chroot_local-packages/*_all.deb chroot/root/local-packages
fi
if ls chroot/root/local-packages/*.deb > /dev/null 2>&1