From 3aa130e5696fd7b85b4637825f0e9c3cd5833cf7 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 23 Jun 2024 12:52:26 -0400 Subject: [PATCH] Small tweaks --- .DS_Store | Bin 0 -> 6148 bytes cam-ingest-mac.sh | 68 ++++++++++++++++++++++++++-------------------- 2 files changed, 38 insertions(+), 30 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..afc57bc9b0e95c22d714d30af50e04a2ecdcd8fe GIT binary patch literal 6148 zcmeHKJ5Iwu5S<||EYU=wq1+Q7MS|W$<^;I_3XuX*BBuzwJ8G`M71DDq-h7B+S)rtW zH`46$&dghTU*Xvm5uLxTW+GD&so{q5X2aMlZ$7e%j8s6iH8$(n;;Gy2MwRCS#;xQ= z*773zA^*cz$K1AS+vTQPB39oX?%oeqpZCN3>c{-<`Q+OszF%9PMg^z<6`%rC;J+z= zo^4iN26ChVRDcQ`6|nz9fg3i7eW3q3F!&V!XvcUrJp0)iSS$c+68k_zU>a0lP&Ka@ z8g#@<)-{QJV9-VV%~&Vjta(GxJlSjUa?vJ`BNdPf}ihP6zTJV7kz# Iz;7t<1^mM&%K!iX literal 0 HcmV?d00001 diff --git a/cam-ingest-mac.sh b/cam-ingest-mac.sh index d46a0c7..5f3f858 100755 --- a/cam-ingest-mac.sh +++ b/cam-ingest-mac.sh @@ -17,18 +17,25 @@ # Some initial variables to work with # Set the date for folder creation CURRENT_DATE=$(date +%F) - # Paths # IMPORTANT: Paths should NEVER have trailing slashes, and ALWAYS have leading slashes + +# SD card mount point +SD_MOUNT_POINT="/Volumes/NO NAME" # Camera's path to images SD_SRC_PATH="/DCIM/100MSDCF" -# Where to ingest to on the Mac -MAC_INGEST_PATH="$HOME/Pictures/Camera Ingest/$CURRENT_DATE" -# Where to ingest to on the NAS -NAS_INGEST_PATH="/Camera Ingest/$CURRENT_DATE" # NAS Network Address NAS_ADDRESS="//GUEST:@192.168.0.2/media" +# Folder where ingests are stored on the Mac +MAC_INGEST_FOLDER="$HOME/Pictures/Camera Ingest" +# Where to ingest to on the Mac +MAC_INGEST_PATH="$MAC_INGEST_FOLDER/$CURRENT_DATE" +# Folder where ingests are stored on the NAS +NAS_INGEST_FOLDER="/Camera Ingest" +# Where to ingest to on the NAS +NAS_INGEST_PATH="$NAS_INGEST_FOLDER/$CURRENT_DATE" + ###################################################################################### # Functions ###################################################################################### @@ -111,8 +118,6 @@ create_folders_nas() { clean_sd() { # Check if the SD card is mounted if mount | grep -q "/Volumes/NO NAME"; then - # Get the SD Card mount point, this is static though - SD_MOUNT_POINT="/Volumes/NO NAME" echo "SD Card Mounted at $SD_MOUNT_POINT." else echo "ERR: SD Card Not mounted!" @@ -199,33 +204,36 @@ ingest_nas() { fi create_folders_nas echo "Beginning copy..." + echo "Syncing ingested images with NAS..." + # Sync /Volumes/voidf1sh/Pictures/Camera Ingest/ with NAS/media/Camera Ingest/ + rsync -azv --progress "$MAC_INGEST_FOLDER/" # Copy JPG files - jpg_files=("$MAC_INGEST_PATH/JPG/"*.JPG) - if [[ -f "${jpg_files[0]}" ]]; then - echo "Copying JPGs..." - rsync -avzc --progress "$MAC_INGEST_PATH/JPG/"*.JPG "$NAS_MOUNT_POINT/$NAS_INGEST_PATH/JPG/" - else - echo "No JPGs, skipping." - fi + # jpg_files=("$MAC_INGEST_PATH/JPG/"*.JPG) + # if [[ -f "${jpg_files[0]}" ]]; then + # echo "Copying JPGs..." + # rsync -avzc --progress "$MAC_INGEST_PATH/JPG/"*.JPG "$NAS_MOUNT_POINT/$NAS_INGEST_PATH/JPG/" + # else + # echo "No JPGs, skipping." + # fi - # Copy ARW files - arw_files=("$MAC_INGEST_PATH/ARW/"*.ARW) - if [[ -f "${arw_files[0]}" ]]; then - echo "Copying ARWs..." - rsync -avzc --progress "$MAC_INGEST_PATH/ARW/"*.ARW "$NAS_MOUNT_POINT/$NAS_INGEST_PATH/ARW/" - else - echo "No ARWs, skipping." - fi + # # Copy ARW files + # arw_files=("$MAC_INGEST_PATH/ARW/"*.ARW) + # if [[ -f "${arw_files[0]}" ]]; then + # echo "Copying ARWs..." + # rsync -avzc --progress "$MAC_INGEST_PATH/ARW/"*.ARW "$NAS_MOUNT_POINT/$NAS_INGEST_PATH/ARW/" + # else + # echo "No ARWs, skipping." + # fi - # Copy MP4 files - mp4_files=("$MAC_INGEST_PATH/MP4/"*.MP4) - if [[ -f "${mp4_files[0]}" ]]; then - echo "Copying MP4s..." - rsync -avzc --progress "$MAC_INGEST_PATH/MP4/"*.MP4 "$NAS_MOUNT_POINT/$NAS_INGEST_PATH/MP4/" - else - echo "No MP4s, skipping." - fi + # # Copy MP4 files + # mp4_files=("$MAC_INGEST_PATH/MP4/"*.MP4) + # if [[ -f "${mp4_files[0]}" ]]; then + # echo "Copying MP4s..." + # rsync -avzc --progress "$MAC_INGEST_PATH/MP4/"*.MP4 "$NAS_MOUNT_POINT/$NAS_INGEST_PATH/MP4/" + # else + # echo "No MP4s, skipping." + # fi echo "Ingest complete!" open "$NAS_MOUNT_POINT/$NAS_INGEST_PATH" }