Small tweaks

This commit is contained in:
Skylar Grant 2024-06-23 12:52:26 -04:00
parent 23c34af92b
commit 3aa130e569
2 changed files with 38 additions and 30 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -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"
}