aboutsummaryrefslogtreecommitdiffstats
path: root/download.sh
diff options
context:
space:
mode:
Diffstat (limited to 'download.sh')
-rw-r--r--download.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/download.sh b/download.sh
index 5f5c608..d210b1e 100644
--- a/download.sh
+++ b/download.sh
@@ -14,13 +14,16 @@ cat packages.csv patches.csv | while read -r line; do
printf "%b" "${PRP}Downloading ${YLW}${CACHEFILE}${RST}... "
download "${URL}"
- if ! echo "${MD5SUM} ${LFS}/sources/${CACHEFILE}" | md5sum -c > /dev/null 2>&1; then
- rm -f "${LFS}/sources/${CACHEFILE}"
- printf "%b" "\n${IPRP} MD5SUM ${YLW}${MD5SUM} ${RED}FAILED! MD5 MISMATCH!${RST}\n"
- exit 1
- fi
+ else
+ printf "%b" "${PRP}File cached ${YLW}${CACHEFILE}${RST}... "
+ fi
+
+ if ! echo "${MD5SUM} ${LFS}/sources/${CACHEFILE}" | md5sum -c > /dev/null 2>&1; then
+ rm -f "${LFS}/sources/${CACHEFILE}"
+ printf "%b" "\n${IPRP} MD5SUM ${YLW}${MD5SUM} ${RED}FAILED! MD5 MISMATCH!${RST}\n"
+ exit 1
+ fi
printf "%b" "\n${IPRP} MD5SUM ${YLW}${MD5SUM}${GRN} OK\n${RST}"
- fi
done