diff options
author | Unit 193 <unit193@unit193.net> | 2021-02-22 20:25:55 -0500 |
---|---|---|
committer | Unit 193 <unit193@unit193.net> | 2021-02-22 20:25:55 -0500 |
commit | 21eff20ea3caec205568e7305732928fedd10b0a (patch) | |
tree | 6480329dd50e13c63a8c39713a7389a642700692 | |
parent | 8a8e11e5d1c747890e1f63c4e821974851c22314 (diff) | |
download | vyos-live-build-21eff20ea3caec205568e7305732928fedd10b0a.tar.gz vyos-live-build-21eff20ea3caec205568e7305732928fedd10b0a.zip |
firmwarelists.sh: Search Contents-all for firmware too.
-rwxr-xr-x | functions/firmwarelists.sh | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/functions/firmwarelists.sh b/functions/firmwarelists.sh index 0540d0051..bf5c177ca 100755 --- a/functions/firmwarelists.sh +++ b/functions/firmwarelists.sh @@ -22,32 +22,36 @@ Firmware_List_From_Contents () { local _ARCHIVE_AREA for _ARCHIVE_AREA in ${ARCHIVE_AREAS} do - local CONTENTS_URL="${MIRROR_CHROOT}/dists/${DISTRO_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURE}.gz" local CONTENTS_FILEDIR="cache/contents.chroot/${DISTRO_CHROOT}/${_ARCHIVE_AREA}" - local CONTENTS_FILE="${CONTENTS_FILEDIR}/contents-${LB_ARCHITECTURE}.gz" - mkdir -p "${CONTENTS_FILEDIR}" - # Purge from cache if not wanting to use from cache, ensuring fresh copy - if [ "${LB_CACHE}" != "true" ] - then - rm -f "${CONTENTS_FILE}" - fi - - # If not cached, download - if [ ! -e "${CONTENTS_FILE}" ] - then - wget ${WGET_OPTIONS} "${CONTENTS_URL}" -O "${CONTENTS_FILE}" - fi - - local PACKAGES - PACKAGES="$(gunzip -c "${CONTENTS_FILE}" | awk '/^lib\/firmware/ { print $2 }' | sort -u )" - FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} ${PACKAGES}" - - # Don't waste disk space, if not making use of caching - if [ "${LB_CACHE}" != "true" ] - then - rm -f "${CONTENTS_FILE}" - fi + local _ARCH + for _ARCH in all ${LB_ARCHITECTURE} + do + local CONTENTS_URL="${MIRROR_CHROOT}/dists/${DISTRO_CHROOT}/${_ARCHIVE_AREA}/Contents-${_ARCH}.gz" + local CONTENTS_FILE="${CONTENTS_FILEDIR}/contents-${_ARCH}.gz" + + # Purge from cache if not wanting to use from cache, ensuring fresh copy + if [ "${LB_CACHE}" != "true" ] + then + rm -f "${CONTENTS_FILE}" + fi + + # If not cached, download + if [ ! -e "${CONTENTS_FILE}" ] + then + wget ${WGET_OPTIONS} "${CONTENTS_URL}" -O "${CONTENTS_FILE}" + fi + + local PACKAGES + PACKAGES="$(gunzip -c "${CONTENTS_FILE}" | awk '/^lib\/firmware/ { print $2 }' | sort -u )" + FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} ${PACKAGES}" + + # Don't waste disk space, if not making use of caching + if [ "${LB_CACHE}" != "true" ] + then + rm -f "${CONTENTS_FILE}" + fi + done done } |