From 50933eb419b55bab5f96e039a832059c64a736c3 Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Mon, 25 Mar 2024 16:22:36 +0000 Subject: [PATCH] added sh script to get the epubs --- ereader_get_epubs.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ereader_get_epubs.sh diff --git a/ereader_get_epubs.sh b/ereader_get_epubs.sh new file mode 100644 index 0000000..86f9db5 --- /dev/null +++ b/ereader_get_epubs.sh @@ -0,0 +1,16 @@ +#!/bin/ash + +if test -f "/mnt/onboard/tldr/all.txt"; then + echo "all.txt exists., remove it"; + rm /mnt/onboard/tldr/all.txt +fi + +wget -nc "https://hub.xpub.nl/chopchop/tl-dr/log-books/all.txt" -O /mnt/onboard/tldr/all.txt + +while read line; do + if test -f "/mnt/onboard/tldr/$line"; then + echo "$line exists." + else + wget "https://hub.xpub.nl/chopchop/tl-dr/log-books/${line}" -O "/mnt/onboard/tldr/${line}" + fi +done < /mnt/onboard/tldr/all.txt