From 2e3f52aab066ab9775d3ece49375a760697bdcc0 Mon Sep 17 00:00:00 2001 From: ayakael Date: Fri, 12 Apr 2019 22:08:41 -0400 Subject: [PATCH] [chk_deployed_ids] Improved logging --- src/chk_deployed_ids | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chk_deployed_ids b/src/chk_deployed_ids index 5dc0788..0d156a1 100644 --- a/src/chk_deployed_ids +++ b/src/chk_deployed_ids @@ -35,11 +35,11 @@ chk_deployed_ids() { fi if [[ -z "$(awk -v imageid=${IMAGEID} -v trackid=${TRACKID} 'BEGIN{FS="\t"}{if($2==imageid && $3==trackid){print $0}}' ${DB_FILE})" ]]; then local ERR=true - echo "Fixing accounting for ${flac}" > ${STDERR} + _ansi up 2; echo -en '\033[K'; echo "[ ${COUNT} / ${#flacList[@]} ] Fixing accounting for ${flac}" echo -e "true\t${IMAGEID}\t${TRACKID}\t${flac}" >> ${DB_FILE} elif [[ "$(awk -v imageid=${IMAGEID} -v trackid=${TRACKID} 'BEGIN{FS="\t"}{if($2==imageid && $3==trackid){print $4}}' ${DB_FILE})" != "${flac}" ]]; then local ERR=true - echo "Fixing path for ${flac}" > ${STDERR} + _ansi up 2; echo -en '\033[K'; echo "[ ${COUNT} / ${#flacList[@]} ] Fixing path for ${flac}" gawk -i inplace -v imageid=${IMAGEID} -v trackid=${TRACKID} 'BEGIN{FS="\t"}{if($2==imageid && $3==trackid){$4=path}{print $0}}' ${DB_FILE} fi done