Restore_package_cache: Handle existing but empty packages directory
This commit is contained in:
parent
5c838744d6
commit
d6b7a54831
|
@ -21,10 +21,10 @@ Restore_package_cache ()
|
||||||
if [ "$(stat --printf %d ${DIRECTORY}/)" = "$(stat --printf %d chroot/var/cache/apt/archives/)" ]
|
if [ "$(stat --printf %d ${DIRECTORY}/)" = "$(stat --printf %d chroot/var/cache/apt/archives/)" ]
|
||||||
then
|
then
|
||||||
# with hardlinks
|
# with hardlinks
|
||||||
find "${DIRECTORY}" -name "*.deb" | xargs cp -fl -t chroot/var/cache/apt/archives
|
find "${DIRECTORY}" -name "*.deb" -print0 | xargs -0 --no-run-if-empty cp -fl -t chroot/var/cache/apt/archives
|
||||||
else
|
else
|
||||||
# without hardlinks
|
# without hardlinks
|
||||||
find "${DIRECTORY}" -name "*.deb" | xargs cp -t chroot/var/cache/apt/archives
|
find "${DIRECTORY}" -name "*.deb" -print0 | xargs -0 --no-run-if-empty cp -t chroot/var/cache/apt/archives
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue