From 04e079222f353f4bda5a89c4322213ee31c7e1a1 Mon Sep 17 00:00:00 2001 From: ayakael Date: Wed, 13 Feb 2019 13:11:17 -0500 Subject: [PATCH] [cmd_export] Knows to retry git annex get with error 255 --- src/cmd_export | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd_export b/src/cmd_export index 272a932..4e644e8 100644 --- a/src/cmd_export +++ b/src/cmd_export @@ -68,6 +68,8 @@ cmd_export() { git -C "${GIT_DIR}" annex get "${imageid}.flac" >${STDERR} 2>&1 local ERROR=$? local GIT_GET=true + [[ ${ERROR} -eq 255 ]] && git -C "${GIT_DIR}" annex get "${imageid}.flac" >/dev/null 2>&1 + local ERROR=$? [[ $ERROR -ne 0 ]] && { _ansi up 2; echo -en '\033[K'; echo "[ ${COUNT} / ${#updateableidList[@]} ] ${imageid} could not be downloaded from server"; cat ${STDERR}; local ERR=true; continue; } fi export_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1