Fix path to media on SD card for Drone

This commit is contained in:
Skylar Grant 2024-06-11 10:31:13 -04:00
parent 5906a96d6d
commit 1594a699e5

18
drone-ingest-mac.sh Normal file → Executable file
View File

@ -21,7 +21,7 @@ CURRENT_DATE=$(date +%F)
# Paths # Paths
# IMPORTANT: Paths should NEVER have trailing slashes, and ALWAYS have leading slashes # IMPORTANT: Paths should NEVER have trailing slashes, and ALWAYS have leading slashes
# Drone's path to images # Drone's path to images
SD_SRC_PATH="/DCIM/100MSDCF" SD_SRC_PATH="/DCIM/100MEDIA"
# Where to ingest to on the Mac # Where to ingest to on the Mac
MAC_INGEST_PATH="$HOME/Pictures/Drone Ingest/$CURRENT_DATE" MAC_INGEST_PATH="$HOME/Pictures/Drone Ingest/$CURRENT_DATE"
# Where to ingest to on the NAS # Where to ingest to on the NAS
@ -109,9 +109,9 @@ create_folders_nas() {
fi fi
} }
# Cleanup non-RAW images on camera. # Cleanup non-RAW images on drone.
clean_sd() { clean_sd() {
echo "Traversing to Camera..." echo "Traversing to Drone..."
cd "$SD_MOUNT_POINT/$SD_SRC_PATH" cd "$SD_MOUNT_POINT/$SD_SRC_PATH"
echo "Removing JPG files..." echo "Removing JPG files..."
rm *.JPG rm *.JPG
@ -119,7 +119,7 @@ clean_sd() {
cd - cd -
} }
# Camera->Mac Ingest # Drone->Mac Ingest
ingest_mac() { ingest_mac() {
# Check if the SD card is mounted # Check if the SD card is mounted
if mount | grep -q $SD_MOUNT_POINT; then if mount | grep -q $SD_MOUNT_POINT; then
@ -214,13 +214,13 @@ ingest_nas() {
# break lines accordingly in the shell # break lines accordingly in the shell
while true; do while true; do
echo "" echo ""
echo "[ Camera Ingest Script ]" echo "[ Drone Ingest Script ]"
echo "" echo ""
echo "Please enter an option from below:" echo "Please enter an option from below:"
echo "" echo ""
echo "[1] Camera->Mac Ingest" echo "[1] Drone->Mac Ingest"
echo "[2] Mac->NAS Ingest" echo "[2] Mac->NAS Ingest"
echo "[X] Cleanup non-RAW images on camera." echo "[X] Cleanup non-RAW images on drone."
echo "" echo ""
echo "[0] Exit" echo "[0] Exit"
@ -230,7 +230,7 @@ while true; do
# Execute the correct commands based on input. # Execute the correct commands based on input.
case "$opt" in case "$opt" in
1) 1)
# Camera->Mac Ingest # Drone->Mac Ingest
clear clear
ingest_mac ingest_mac
;; ;;
@ -240,7 +240,7 @@ while true; do
ingest_nas ingest_nas
;; ;;
3) 3)
# Cleanup non-RAW images on camera. # Cleanup non-RAW images on drone.
clear clear
echo "Temporarily disabled!" echo "Temporarily disabled!"
# clean_sd # clean_sd