diff --git a/extra-packages/scripts/getpaper/getpaper.sh b/extra-packages/scripts/getpaper/getpaper.sh index b5451dc..4809c6d 100755 --- a/extra-packages/scripts/getpaper/getpaper.sh +++ b/extra-packages/scripts/getpaper/getpaper.sh @@ -97,6 +97,8 @@ if [ "${ITEM_PAGE}" -gt 0 ]; then fi IMAGE_URL="$(echo "${RESULT}" | jq -r ".data[${ITEM_NUMBER}].path")" FILENAME="${IMAGE_URL##*/}" -curl --silent -L --output-dir "${DIR}" -o "${FILENAME}" "${IMAGE_URL}" +if [ ! -f "${DIR}/${FILENAME}" ]; then + curl --silent -L --output-dir "${DIR}" -o "${FILENAME}" "${IMAGE_URL}" +fi echo "${DIR}/${FILENAME}"