summaryrefslogtreecommitdiff
path: root/helpers/bootstrap_cdebootstrap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-04-02 17:48:03 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:06 +0100
commit66a1f5f07ce832523c7527e7fe2119611aba6d09 (patch)
tree737df366cba90333966e404100002c8a1885b36e /helpers/bootstrap_cdebootstrap
parent78a85f9b83a09109a0536e5986defe21bacbe003 (diff)
downloadlive-build-66a1f5f07ce832523c7527e7fe2119611aba6d09.zip
live-build-66a1f5f07ce832523c7527e7fe2119611aba6d09.tar.gz
Making handling of cache/packages_bootstrap a bit more error proove, thanks to Michal Suchanek <michal.suchanek@ruk.cuni.cz> for bringing it up.
Diffstat (limited to 'helpers/bootstrap_cdebootstrap')
-rwxr-xr-xhelpers/bootstrap_cdebootstrap8
1 files changed, 2 insertions, 6 deletions
diff --git a/helpers/bootstrap_cdebootstrap b/helpers/bootstrap_cdebootstrap
index d37b0a5..11f77d3 100755
--- a/helpers/bootstrap_cdebootstrap
+++ b/helpers/bootstrap_cdebootstrap
@@ -123,7 +123,7 @@ if [ -x "/usr/bin/cdebootstrap" ] || [ -x "/usr/bin/cdebootstrap-static" ]
then
if [ "${LH_CACHE_PACKAGES}" = "true" ]
then
- if [ -d cache/packages_bootstrap ]
+ if ls cache/packages_bootstrap/*.deb > /dev/null 2>&1
then
mkdir -p chroot/var/cache/bootstrap
cp cache/packages_bootstrap/*.deb chroot/var/cache/bootstrap
@@ -138,14 +138,10 @@ then
fi
# Removing old cache
- if [ -d cache/packages_bootstrap ]
- then
- rm -f cache/packages_bootstrap/*.deb
- fi
+ rm -f cache/packages_bootstrap/*.deb
# Saving new cache
mkdir -p cache/packages_bootstrap
-
cp chroot/var/cache/bootstrap/*.deb cache/packages_bootstrap
fi