diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-07-24 04:42:59 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:37 +0100 |
commit | 877603ae022b5ffa013df24066888bd9f0753799 (patch) | |
tree | ee1980fa2c2c5c1c1aea57527a4528b076630de9 /helpers/lh_binary_debian-installer | |
parent | 39fb12bf15f6b956fcf6f4f5b47466a506aa2789 (diff) | |
download | vyos-live-build-877603ae022b5ffa013df24066888bd9f0753799.tar.gz vyos-live-build-877603ae022b5ffa013df24066888bd9f0753799.zip |
Wrap most calls to wget in lh_binary_debian-installer.
Diffstat (limited to 'helpers/lh_binary_debian-installer')
-rwxr-xr-x | helpers/lh_binary_debian-installer | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index 90d00f1b8..85d88e37c 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -191,6 +191,16 @@ Install_file() { cp "${FILE}" "${TARGET}"/"${LETTER}"/"${SOURCE}" } +Download_file () { + local _LH_TARGET + _LH_TARGET="${1}" + + local _LH_URL + _LH_URL="${2}" + + wget ${WGET_OPTIONS} -O "${_LH_TARGET}" "${_LH_URL}" +} + VMLINUZ_DI="vmlinuz" INITRD_DI="initrd.gz" DESTDIR_DI="${DESTDIR}" @@ -285,9 +295,9 @@ then if [ "${LH_DISTRIBUTION}" = "etch" ] then - wget ${WGET_OPTIONS} -O mini.iso ${URL}/combined/2.6/mini.iso + Download_file mini.iso ${URL}/combined/2.6/mini.iso else - wget ${WGET_OPTIONS} -O mini.iso ${URL}/mini.iso + Download_file mini.iso ${URL}/mini.iso fi mkdir mini.tmp @@ -300,8 +310,8 @@ then rm -rf mini.tmp mini.iso else # Downloading debian-installer - wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${VMLINUZ_DI}" ${URL}/${DI_REMOTE_BASE}/${DI_REMOTE_KERNEL} - wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI_REMOTE_BASE}/initrd.gz + Download_file "${DESTDIR}"/"${VMLINUZ_DI}" ${URL}/${DI_REMOTE_BASE}/${DI_REMOTE_KERNEL} + Download_file "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI_REMOTE_BASE}/initrd.gz # Downloading graphical-installer DOWNLOAD_GTK_INSTALLER=0 @@ -320,8 +330,8 @@ else if [ ${DOWNLOAD_GTK_INSTALLER} -eq 1 ] then mkdir -p "${DESTDIR_GI}" - wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/${DI_REMOTE_KERNEL} - wget ${WGET_OPTIONS} -O "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/initrd.gz + Download_file "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/${DI_REMOTE_KERNEL} + Download_file "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/initrd.gz fi fi @@ -413,13 +423,13 @@ then cd "${OLDPWD}" # Fetching release - wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release -O binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release + Download_file binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release mkdir binary.udeb cd binary.udeb # Downloading udeb indices - wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz + Download_file Packages.gz "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz gunzip -c Packages.gz > Packages # Sorting udebs |