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