From c586c36877861b66947d761a6673f870232a53e5 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 6 Mar 2024 08:57:21 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- Viewer/archive/media/img/my/work/sync-flash.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Viewer/archive/media/img/my/work/sync-flash.sh b/Viewer/archive/media/img/my/work/sync-flash.sh index 70430084..16b88c6c 100755 --- a/Viewer/archive/media/img/my/work/sync-flash.sh +++ b/Viewer/archive/media/img/my/work/sync-flash.sh @@ -118,6 +118,7 @@ if ! [ -z "$2" ] ; then TITLE=" - $2" fi +BASE=${BASE%/}/ DRIVE=${1} __BASE=$BASE @@ -198,9 +199,9 @@ while true ; do fi # sanity check... - if ! [ -e "${BASE}/${DRIVE}" ] ; then + if ! [ -e "${BASE}${DRIVE}" ] ; then echo - echo "ERR: ${BASE}/${DRIVE}: does not exist, nothing to copy." + echo "ERR: ${BASE}${DRIVE}: does not exist, nothing to copy." echo if [[ $INTERACTIVE || ! $DRIVE ]] ; then continue @@ -236,8 +237,8 @@ while true ; do mkdir -vp "$DIR" - echo "Copying files from ${BASE}/${DRIVE} (~`du -hs "${BASE}/${DRIVE}" | cut -f 1`)..." - $COPY $COPYFLAGS ${BASE}/${DRIVE}/* "$DIR" \ + 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