Fixes and cleanup
This commit is contained in:
@@ -22,16 +22,12 @@ done
|
||||
# Create the target directory with the camera model as its name
|
||||
CAMERA=$(gphoto2 --summary | grep "Model" | cut -d: -f2 | tr -d '[:space:]')
|
||||
STORAGE_MOUNT_POINT="$HOME_DIR/$CAMERA"
|
||||
|
||||
# Set the ACT LED to blink at 500ms to indicate that the camera has been detected
|
||||
sudo sh -c "echo 500 > /sys/class/leds/led0/delay_on"
|
||||
mkdir -p $STORAGE_MOUNT_POINT
|
||||
|
||||
# Switch to STORAGE_MOUNT_POINT and transfer files from the camera
|
||||
# Rename the transferred files using the YYYYMMDD-HHMMSS format
|
||||
cd $STORAGE_MOUNT_POINT
|
||||
gphoto2 --get-all-files --skip-existing --filename=%Y%m%d-%H%M%S.%C
|
||||
# Turn off the ACT LED to indicate that the backup is completed
|
||||
sudo sh -c "echo 0 > /sys/class/leds/led0/brightness"
|
||||
|
||||
# Shutdown
|
||||
shutdown -h now
|
||||
|
||||
Reference in New Issue
Block a user