From b619ddf3374ffd0fb4fff18835f6a0f460f28c0a Mon Sep 17 00:00:00 2001 From: tuxwarrior Date: Sun, 12 May 2024 12:22:06 -0500 Subject: [PATCH] / missing source dir will lead to exit sync needs to be started first --- dots/bin/syncDirSetup.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dots/bin/syncDirSetup.sh b/dots/bin/syncDirSetup.sh index 65cfb1a..8252a38 100755 --- a/dots/bin/syncDirSetup.sh +++ b/dots/bin/syncDirSetup.sh @@ -34,8 +34,9 @@ if [[ "${src_dir}" == "${trg_dir}" ]]; then fi if ! [[ -d ${src_dir} ]]; then - echo "creating non-existing source directory '${src_dir}'" - mkdir -p ${src_dir} + echo "error: non-existing source directory '${src_dir}'" + echo "you need to set up sync before you continue!" + exit 1 fi if ! [[ -d ${trg_dir} ]]; then @@ -51,8 +52,6 @@ if mount | grep ${trg_dir} > /dev/null; then else echo "mounting source '${src_dir}' to target '${trg_dir}'." - # example command: - # sudo mount -o bind --source /media/drive2/nass/lo/pCloudSync --target ~/pCloudSync sudo mount -o bind --source ${src_dir} --target ${trg_dir} du --human-readable --max-depth=1 ${trg_dir}