[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}
|
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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue