#!/bin/bash cat packages.csv | while read line; do NAME="$(echo $line | cut -d\, -f1)" VERSION="$(echo $line | cut -d\, -f2)" URL="$(echo $line | cut -d\, -f3 | sed "s/@/${VERSION}/g")" MD5SUM="$(echo $line | cut -d\, -f4)" CACHEFILE="$(basename "${URL}")" if [ ! -f "${CACHEFILE}" ]; then echo "Downloading ${URL}" wget -nc -O "${LFS_SRC}/${CACHEFILE}" "${URL}" if ! echo "${MD5SUM} ${LFS_SRC}/${CACHEFILE}" | md5sum -c >/dev/null; then rm -f "${LFS_SRC}/${CACHEFILE}" echo "Verification of ${CACHEFILE} failed! MD5 mismatch!" exit 1 fi fi done wget -nc -O "${LFS_SRC}" \ http://www.linuxfromscratch.org/patches/lfs/10.1/bzip2-1.0.8-install_docs-1.patch \ http://www.linuxfromscratch.org/patches/lfs/10.1/coreutils-8.32-i18n-1.patch \ http://www.linuxfromscratch.org/patches/lfs/10.1/glibc-2.33-fhs-1.patch \ http://www.linuxfromscratch.org/patches/lfs/10.1/kbd-2.4.0-backspace-1.patch \ http://www.linuxfromscratch.org/patches/lfs/10.1/sysvinit-2.98-consolidated-1.patch