[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:
parent
1874482e55
commit
5034f4c1bb
4 changed files with 5 additions and 5 deletions
|
@ -38,7 +38,7 @@ chk_deployed_ids() {
|
|||
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}
|
||||
fi
|
||||
[[ "${ERR}" == "true" ]] && cat ${STDERR} || { _ansi up 2; echo -en '\033[K'; }
|
||||
[[ "${ERR}" == "true" ]] && cat ${STDERR}
|
||||
done
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ chk_metadata() {
|
|||
for imageid in ${imageidList[@]}; do
|
||||
echo "[ ${COUNT} / ${#imageidList[@]} ] Checking ${imageid} in ${TARGET}"
|
||||
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 ))
|
||||
done
|
||||
[[ "${ERR}" == "true" ]] && { _msg EXEC "Metadata check completed with errors"; _msg WARN; } || { _msg EXEC "Metadata check completed succesfully"; _msg OK; }
|
||||
|
|
|
@ -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}
|
||||
local $?=1
|
||||
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 ))
|
||||
done
|
||||
[[ "${ERR}" == "true" ]] && { _msg EXEC "Nonexistent files check completed with errors"; _msg WARN; } || { _msg EXEC "Nonexistent files check completed succesfully"; _msg OK; }
|
||||
|
|
|
@ -41,7 +41,7 @@ cmd_deploy() {
|
|||
for removableid in ${removableidList[@]}; do
|
||||
echo "[ ${COUNT} / ${#removableidList[@]} ] Removing ${removableid} from ${TARGET}"
|
||||
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 ))
|
||||
done
|
||||
|
||||
|
@ -58,7 +58,7 @@ cmd_deploy() {
|
|||
|
||||
# Processes metadata changes
|
||||
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
|
||||
|
||||
if [[ -z "${removableidList[@]}" ]] && [[ -z "${updateableidList[@]}" ]]; then echo "Nothing to do"; fi
|
||||
|
|
Loading…
Reference in a new issue