fetch_gaidao.sh: Do not try to download nothingness.
This commit is contained in:
parent
44a918d349
commit
65a498f2f7
|
@ -9,7 +9,7 @@ for ausgabe in ${ausgaben}; do
|
||||||
url=$(curl -s "${ausgabe}" \
|
url=$(curl -s "${ausgabe}" \
|
||||||
| grep -Eo 'https://fda-ifa.org/wp-content/uploads/[0-9]{4}/[0-9]{2}/[^ ]*\.epub')
|
| grep -Eo 'https://fda-ifa.org/wp-content/uploads/[0-9]{4}/[0-9]{2}/[^ ]*\.epub')
|
||||||
file=$(echo "${url}" | grep -o '[^/]*\.epub')
|
file=$(echo "${url}" | grep -o '[^/]*\.epub')
|
||||||
if [ ! -e "${file}" ]; then
|
if [ -n "${file}" ] && [ ! -e "${file}" ]; then
|
||||||
echo "Downloading Gai Dao: ${file}."
|
echo "Downloading Gai Dao: ${file}."
|
||||||
curl -so "${file}" "${url}"
|
curl -so "${file}" "${url}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue