From fb3eac19015a37ddb2dd2e1c3f58a11ec4f3dc82 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 23 Jun 2024 15:43:38 -0400 Subject: [PATCH] Tested and working sd-mac and mac-nas --- ingest-mac.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ingest-mac.sh b/ingest-mac.sh index 0624547..43c6ea0 100755 --- a/ingest-mac.sh +++ b/ingest-mac.sh @@ -117,19 +117,19 @@ mode_prompt() { # Create and open Mac folders. create_folders_mac() { # Check if the parent ingest directory doesn't exist - if [[ ! -d "$MAC_INGEST_PATH}" ]]; then - echo "Creating ingest folder at $MAC_INGEST_PATH}" + if [[ ! -d "$MAC_INGEST_PATH" ]]; then + echo "Creating ingest folder at $MAC_INGEST_PATH" # Since the parent doesn't exist, we create it and all children at once - mkdir -p "$MAC_INGEST_PATH}" + mkdir -p "$MAC_INGEST_PATH" # $? is the exit status of the last commmand, with 0 being success if [[ $? -eq 0 ]]; then echo "Success!" else - echo "Failed to create directory at $MAC_INGEST_PATH}" + echo "Failed to create directory at $MAC_INGEST_PATH" exit 1 fi else - echo "Ingest folder already exists: $MAC_INGEST_PATH}" + echo "Ingest folder already exists: $MAC_INGEST_PATH" fi } @@ -271,7 +271,7 @@ ingest_nas() { echo "Press any key to continue..." read -n 1 -s # Sync /Volumes/voidf1sh/Pictures/Camera Ingest/ with NAS/media/Camera Ingest/ - rsync -azv --progress "$MAC_INGEST_FOLDER/" "$NAS_MOUNT_POINT${NAS_INGEST_FOLDER[$INGEST_MODE]}/" $dry_run + rsync -azv --progress "${MAC_INGEST_FOLDER[$INGEST_MODE]}/" "$NAS_MOUNT_POINT${NAS_INGEST_FOLDER[$INGEST_MODE]}/" $dry_run # Copy JPG files # jpg_files=("$MAC_INGEST_PATH/JPG/"*.JPG)