[cmd_export] Knows to retry git annex get with error 255

This commit is contained in:
ayakael 2019-02-13 13:11:17 -05:00
parent 0e41538ed3
commit 04e079222f
No known key found for this signature in database
GPG key ID: DF4ED0DE242BD38A

View file

@ -68,6 +68,8 @@ cmd_export() {
git -C "${GIT_DIR}" annex get "${imageid}.flac" >${STDERR} 2>&1 git -C "${GIT_DIR}" annex get "${imageid}.flac" >${STDERR} 2>&1
local ERROR=$? local ERROR=$?
local GIT_GET=true 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; } [[ $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 fi
export_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1 export_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1