Tested and working sd-mac and mac-nas

This commit is contained in:
Skylar Grant 2024-06-23 15:43:38 -04:00
parent 3f97971e3e
commit fb3eac1901

View File

@ -117,19 +117,19 @@ mode_prompt() {
# Create and open Mac folders. # Create and open Mac folders.
create_folders_mac() { create_folders_mac() {
# Check if the parent ingest directory doesn't exist # Check if the parent ingest directory doesn't exist
if [[ ! -d "$MAC_INGEST_PATH}" ]]; then if [[ ! -d "$MAC_INGEST_PATH" ]]; then
echo "Creating ingest folder at $MAC_INGEST_PATH}" echo "Creating ingest folder at $MAC_INGEST_PATH"
# Since the parent doesn't exist, we create it and all children at once # 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 # $? is the exit status of the last commmand, with 0 being success
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo "Success!" echo "Success!"
else else
echo "Failed to create directory at $MAC_INGEST_PATH}" echo "Failed to create directory at $MAC_INGEST_PATH"
exit 1 exit 1
fi fi
else else
echo "Ingest folder already exists: $MAC_INGEST_PATH}" echo "Ingest folder already exists: $MAC_INGEST_PATH"
fi fi
} }
@ -271,7 +271,7 @@ ingest_nas() {
echo "Press any key to continue..." echo "Press any key to continue..."
read -n 1 -s read -n 1 -s
# Sync /Volumes/voidf1sh/Pictures/Camera Ingest/ with NAS/media/Camera Ingest/ # 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 # Copy JPG files
# jpg_files=("$MAC_INGEST_PATH/JPG/"*.JPG) # jpg_files=("$MAC_INGEST_PATH/JPG/"*.JPG)