diff --git a/src/chk_deployed_ids b/src/chk_deployed_ids index 38b5681..67318e6 100644 --- a/src/chk_deployed_ids +++ b/src/chk_deployed_ids @@ -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 } diff --git a/src/chk_metadata b/src/chk_metadata index 4dc23d5..e92549a 100644 --- a/src/chk_metadata +++ b/src/chk_metadata @@ -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; } diff --git a/src/chk_nonexistent_ids b/src/chk_nonexistent_ids index b638ec6..c46f6df 100644 --- a/src/chk_nonexistent_ids +++ b/src/chk_nonexistent_ids @@ -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; } diff --git a/src/cmd_deploy b/src/cmd_deploy index 074c438..08dd896 100644 --- a/src/cmd_deploy +++ b/src/cmd_deploy @@ -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