From ef2b0289d49a905324ae3448352c8c741e37c59b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Oct 2012 23:37:35 +0200 Subject: Using xargs when copying or hardlinking deb files from and to the package cache to avoid hit the shell max command limits (Closes: #691616). --- functions/cache.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functions') diff --git a/functions/cache.sh b/functions/cache.sh index a04521a78..ecad72029 100755 --- a/functions/cache.sh +++ b/functions/cache.sh @@ -20,10 +20,10 @@ Restore_cache () if [ "$(stat --printf %d ${DIRECTORY})" = "$(stat --printf %d chroot/var/cache/apt/archives)" ] then # with hardlinks - cp -fl "${DIRECTORY}"/*.deb chroot/var/cache/apt/archives + find "${DIRECTORY}" -name "*.deb" | xargs cp -fl -t chroot/var/cache/apt/archives else # without hardlinks - cp "${DIRECTORY}"/*.deb chroot/var/cache/apt/archives + find "${DIRECTORY}" -name "*.deb" | xargs cp -t chroot/var/cache/apt/archives fi fi fi -- cgit v1.2.3