From 12a024dac21cdaf39774d27fc7f2d580318f3935 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 4 Mar 2024 04:39:45 +0300 Subject: [PATCH] remove empty error log... Signed-off-by: Alex A. Naanou --- Viewer/archive/media/img/my/work/sync-flash.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Viewer/archive/media/img/my/work/sync-flash.sh b/Viewer/archive/media/img/my/work/sync-flash.sh index bd47a24d..aa773971 100755 --- a/Viewer/archive/media/img/my/work/sync-flash.sh +++ b/Viewer/archive/media/img/my/work/sync-flash.sh @@ -239,6 +239,10 @@ while true ; do echo "Copying files from ${BASE}/${DRIVE} (~`du -hs "${BASE}/${DRIVE}" | cut -f 1`)..." $COPY $COPYFLAGS ${BASE}/${DRIVE}/* "$DIR" \ 2> >(tee "${DIR}"/copy-err.log) + # no errors -> remove log... + if ! [ -s "${DIR}/copy-err.log"] ; then + rm -f "${DIR}"/copy-err.log + fi echo "Copying files: done."