[cmd_deploy][chk_deployed_idas][chk_metadata][chk_nonexistent_ids][cmd_deploy] Status will now not stay on just one line

This commit is contained in:
ayakael 2018-04-07 22:43:55 -04:00
parent 1874482e55
commit 5034f4c1bb
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026
4 changed files with 5 additions and 5 deletions

View file

@ -38,7 +38,7 @@ chk_deployed_ids() {
echo "Fixing path for ${flac}" > ${STDERR} echo "Fixing path for ${flac}" > ${STDERR}
gawk -i inplace -v imageid=${IMAGEID} -v trackid=${TRACKID} 'BEGIN{FS="\t"}{if($2==imageid && $3==trackid){$4=path}{print $0}}' ${DB_FILE} gawk -i inplace -v imageid=${IMAGEID} -v trackid=${TRACKID} 'BEGIN{FS="\t"}{if($2==imageid && $3==trackid){$4=path}{print $0}}' ${DB_FILE}
fi fi
[[ "${ERR}" == "true" ]] && cat ${STDERR} || { _ansi up 2; echo -en '\033[K'; } [[ "${ERR}" == "true" ]] && cat ${STDERR}
done done
} }

View file

@ -22,7 +22,7 @@ chk_metadata() {
for imageid in ${imageidList[@]}; do for imageid in ${imageidList[@]}; do
echo "[ ${COUNT} / ${#imageidList[@]} ] Checking ${imageid} in ${TARGET}" echo "[ ${COUNT} / ${#imageidList[@]} ] Checking ${imageid} in ${TARGET}"
deploy_meta "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} >${STDERR} 2>&1 deploy_meta "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} >${STDERR} 2>&1
[[ $? -eq 0 ]] && { _ansi up 2; echo -en '\033[K'; } || { echo "[>>>>>>] Error reported"; cat ${STDERR}; local ERR=true; } [[ $? -eq 0 ]] || { echo "[>>>>>>] Error reported"; cat ${STDERR}; local ERR=true; }
local COUNT=$(( ${COUNT} + 1 )) local COUNT=$(( ${COUNT} + 1 ))
done done
[[ "${ERR}" == "true" ]] && { _msg EXEC "Metadata check completed with errors"; _msg WARN; } || { _msg EXEC "Metadata check completed succesfully"; _msg OK; } [[ "${ERR}" == "true" ]] && { _msg EXEC "Metadata check completed with errors"; _msg WARN; } || { _msg EXEC "Metadata check completed succesfully"; _msg OK; }

View file

@ -29,7 +29,7 @@ chk_nonexistent_ids() {
gawk -i inplace -v imageid=${IMAGEID} trackid=${TRACKID} 'BEGIN{FS="\t";OFS="\t"}{if($2==imageid && $3==trackid){$4="null"}{print $0}}' ${DB_FILE} gawk -i inplace -v imageid=${IMAGEID} trackid=${TRACKID} 'BEGIN{FS="\t";OFS="\t"}{if($2==imageid && $3==trackid){$4="null"}{print $0}}' ${DB_FILE}
local $?=1 local $?=1
fi fi
[[ $? -eq 0 ]] && { _ansi up 2; echo -en '\033[K'; } || { echo "[>>>>>>] Error reported"; echo "${TRACKID} of ${IMAGEID} points to non-existent file"}; local ERR=true; } [[ $? -eq 0 ]] || { echo "[>>>>>>] Error reported"; echo "${TRACKID} of ${IMAGEID} points to non-existent file"}; local ERR=true; }
local COUNT=$(( ${COUNT} + 1 )) local COUNT=$(( ${COUNT} + 1 ))
done done
[[ "${ERR}" == "true" ]] && { _msg EXEC "Nonexistent files check completed with errors"; _msg WARN; } || { _msg EXEC "Nonexistent files check completed succesfully"; _msg OK; } [[ "${ERR}" == "true" ]] && { _msg EXEC "Nonexistent files check completed with errors"; _msg WARN; } || { _msg EXEC "Nonexistent files check completed succesfully"; _msg OK; }

View file

@ -41,7 +41,7 @@ cmd_deploy() {
for removableid in ${removableidList[@]}; do for removableid in ${removableidList[@]}; do
echo "[ ${COUNT} / ${#removableidList[@]} ] Removing ${removableid} from ${TARGET}" echo "[ ${COUNT} / ${#removableidList[@]} ] Removing ${removableid} from ${TARGET}"
deploy_rm "${TARGET}" "${DB_FILE}" ${removableid} >${STDERR} 2>&1 deploy_rm "${TARGET}" "${DB_FILE}" ${removableid} >${STDERR} 2>&1
[[ $? -eq 0 ]] && { _ansi up 2; echo -en '\033[K'; } || { echo "[>>>>>>] Error reported"; cat ${STDERR}; local ERR=true; } [[ $? -eq 0 ]] || { echo "[>>>>>>] Error reported"; cat ${STDERR}; local ERR=true; }
local COUNT=$(( ${COUNT} + 1 )) local COUNT=$(( ${COUNT} + 1 ))
done done
@ -58,7 +58,7 @@ cmd_deploy() {
# Processes metadata changes # Processes metadata changes
deploy_meta "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} >${STDERR} 2>&1 deploy_meta "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} >${STDERR} 2>&1
[[ $? -eq 0 ]] && { _ansi up 2; echo -en '\033[K'; } || { echo "[>>>>>>] Error reported"; cat ${STDERR}; local ERR=true; } [[ $? -eq 0 ]] || { echo "[>>>>>>] Error reported"; cat ${STDERR}; local ERR=true; }
done done
if [[ -z "${removableidList[@]}" ]] && [[ -z "${updateableidList[@]}" ]]; then echo "Nothing to do"; fi if [[ -z "${removableidList[@]}" ]] && [[ -z "${updateableidList[@]}" ]]; then echo "Nothing to do"; fi