blob: a034cb6ff67717eaaa09522252143454627b73fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
source lfs.sh
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
|