Camera Backup Script

I’ve noticed when playing with the code that the camera backup script operates slightly differently from the card backup script.

In the card backup script, there’s an explicit function that is waiting for the storage device to be mounted:

# Wait for a USB storage device (e.g., a USB flash drive)
STORAGE=$(ls /dev/* | grep "$STORAGE_DEV" | cut -d"/" -f3)
while [ -z "${STORAGE}" ]
    sleep 1
    STORAGE=$(ls /dev/* | grep "$STORAGE_DEV" | cut -d"/" -f3)
# When the USB storage device is detected, mount it

This is not present in the camera backup script, there’s just a directory change:

Should this be changed:

  1. To ensure that the storage device is mounted
  2. To have the same sequence of operations
  3. To be able to have continuity on user feedback.

That’s because the camera backup script uses the internal storage (i.e., the system SD card) as the backup destination. Since the card is always there, there is no need to wait for it. But your reasoning makes sense. Feel free to submit a merge request with your changes. Thanks!