summaryrefslogtreecommitdiff
path: root/tools/download.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/download.sh')
-rwxr-xr-xtools/download.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/download.sh b/tools/download.sh
index 901fd3f..d407a77 100755
--- a/tools/download.sh
+++ b/tools/download.sh
@@ -11,7 +11,7 @@ src="$(dirname "${tools}")"
doc="${src}/doc"
documents='
-ft232r.pdf https://www.ftdichip.com/old2020/Support/Documents/DataSheets/ICs/DS_FT232R.pdf
+ft232r.pdf https://www.ftdichip.com/old2020/Support/Documents/DataSheets/ICs/DS_FT232R.pdf 9dc583a87fdd8cc20f538197bb4cf807
'
@@ -26,10 +26,18 @@ do
name="$(echo "$line" | cut -d$'\t' -f1)"
url="$(echo "$line" | cut -d$'\t' -f2)"
+ checksum="$(echo "$line" | cut -d$'\t' -f3)"
path="${doc}/${name}"
if [ ! -f "$path" ]
then
curl "$url" > "$path"
fi
+
+ if [ "${checksum} ${path}" == "$(md5sum "$path")" ]
+ then
+ echo "OK ${name}"
+ else
+ echo "NOT OK ${name}"
+ fi
done