[cmd_deploy] now gets image files from server if not present

This commit is contained in:
ayakael 2018-04-15 21:09:34 -04:00
parent 844b23f3c7
commit 240eb94286
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -54,7 +54,10 @@ cmd_deploy() {
echo "[ ${COUNT} / ${#updateableidList[@]} ] Deploying ${imageid}"
# Processes deployableids (IMAGEIDs that have TRACKIDs that are not present in target, but are selected)
if _if_array_contains ${imageid} ${deployableidList[@]}; then
local GIT_GET=false
[[ ! -f "${GIT_DIR}/${imageid}.flac" ]] && { git -C "${GIT_DIR}" annex get "${imageid}.flac" >/dev/null 2>&1; local GIT_GET=true; }
deploy_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1
[[ "${GIT_GET}" == "true" ]] && git -C "${GIT_DIR}" annex drop ${imageid}.flac >/dev/null 2>&1
[[ $? -ne 0 ]] && { _ansi up 2; echo -en '\033[K'; echo "[ ${COUNT} / ${#updateableidList[@]} ] Copy of ${imageid} completed with errors"; cat ${STDERR}; local ERR=true; continue; }
fi