summaryrefslogtreecommitdiff
path: root/functions/cache.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-10-27 23:37:35 +0200
committerDaniel Baumann <daniel@debian.org>2012-10-27 23:59:18 +0200
commitef2b0289d49a905324ae3448352c8c741e37c59b (patch)
tree577f2bf3be8b2e661714102a707164f633254cc7 /functions/cache.sh
parent74c6a77e5a5e27c2d70844a191a3d1d54383b8d1 (diff)
downloadvyos-live-build-ef2b0289d49a905324ae3448352c8c741e37c59b.tar.gz
vyos-live-build-ef2b0289d49a905324ae3448352c8c741e37c59b.zip
Using xargs when copying or hardlinking deb files from and to the package cache to avoid hit the shell max command limits (Closes: #691616).
Diffstat (limited to 'functions/cache.sh')
-rwxr-xr-xfunctions/cache.sh4
1 files changed, 2 insertions, 2 deletions
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