summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/download.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/download.sh b/tools/download.sh
new file mode 100755
index 0000000..901fd3f
--- /dev/null
+++ b/tools/download.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+
+set -euf
+
+
+# absolute paths
+script="$(realpath $0)"
+tools="$(dirname "${script}")"
+src="$(dirname "${tools}")"
+doc="${src}/doc"
+
+documents='
+ft232r.pdf https://www.ftdichip.com/old2020/Support/Documents/DataSheets/ICs/DS_FT232R.pdf
+'
+
+
+mkdir -pv "$doc"
+
+echo "$documents" | while read line
+do
+ if [ "$line" == '' ]
+ then
+ continue
+ fi
+
+ name="$(echo "$line" | cut -d$'\t' -f1)"
+ url="$(echo "$line" | cut -d$'\t' -f2)"
+ path="${doc}/${name}"
+
+ if [ ! -f "$path" ]
+ then
+ curl "$url" > "$path"
+ fi
+done