diff options
Diffstat (limited to 'scripts/build/installer_debian-installer')
-rwxr-xr-x | scripts/build/installer_debian-installer | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer index 60798c3f6..e3e79ec81 100755 --- a/scripts/build/installer_debian-installer +++ b/scripts/build/installer_debian-installer @@ -546,14 +546,15 @@ then for UDEB in ${UDEBS} do - # Copy from cache if available, otherwise download - if [ -f ../cache/packages.installer_debian-installer.udeb/"$(basename ${UDEB})" ] + _UDEB_FILENAME="$(basename ${UDEB})" + # Skip if already got (any version), i.e. should parent and derive both list it + if ! ls "$(${_UDEB_FILENAME} | awk -F_ '{ print $1 }')"_* > /dev/null 2>&1 then - cp ../cache/packages.installer_debian-installer.udeb/"$(basename ${UDEB})" ./ - else - # Skip if already got (any version), i.e. should parent and derive both list it - if ! ls "$(basename ${UDEB} | awk -F_ '{ print $1 }')"_* > /dev/null 2>&1 + # Copy from cache if available, otherwise download + if [ -f ../cache/packages.installer_debian-installer.udeb/"${_UDEB_FILENAME}" ] then + cp ../cache/packages.installer_debian-installer.udeb/"${_UDEB_FILENAME}" ./ + else wget ${WGET_OPTIONS} "${LB_MIRROR_CHROOT}"/${UDEB} || wget ${WGET_OPTIONS} "${LB_PARENT_MIRROR_CHROOT}"/${UDEB} fi fi |