Detect GPX file automatically
This commit is contained in:
@@ -10,7 +10,6 @@ STORAGE_DEV="sda1" # Name of the storage device
|
|||||||
STORAGE_MOUNT_POINT="/media/storage" # Mount point of the storage device
|
STORAGE_MOUNT_POINT="/media/storage" # Mount point of the storage device
|
||||||
CARD_DEV="sdb1" # Name of the storage card
|
CARD_DEV="sdb1" # Name of the storage card
|
||||||
CARD_MOUNT_POINT="/media/card" # Mount point of the storage card
|
CARD_MOUNT_POINT="/media/card" # Mount point of the storage card
|
||||||
GPX="geo.gpx" # Name of the reference photo to be used for geotagging
|
|
||||||
SHUTD="5" # Minutes to wait before shutdown due to inactivity
|
SHUTD="5" # Minutes to wait before shutdown due to inactivity
|
||||||
|
|
||||||
# If there is a wpa_supplicant.conf file in the root of the storage device
|
# If there is a wpa_supplicant.conf file in the root of the storage device
|
||||||
@@ -61,6 +60,7 @@ if [ ! -z $CARD_READER ]; then
|
|||||||
mount /dev/$CARD_DEV $CARD_MOUNT_POINT
|
mount /dev/$CARD_DEV $CARD_MOUNT_POINT
|
||||||
# # Set the ACT LED to blink at 500ms to indicate that the card has been mounted
|
# # Set the ACT LED to blink at 500ms to indicate that the card has been mounted
|
||||||
sudo sh -c "echo 500 > /sys/class/leds/led0/delay_on"
|
sudo sh -c "echo 500 > /sys/class/leds/led0/delay_on"
|
||||||
|
|
||||||
# Create a .id random identifier file if doesn't exist
|
# Create a .id random identifier file if doesn't exist
|
||||||
cd $CARD_MOUNT_POINT
|
cd $CARD_MOUNT_POINT
|
||||||
if [ ! -f *.id ]; then
|
if [ ! -f *.id ]; then
|
||||||
@@ -80,7 +80,8 @@ sudo lsblk > lsblk.log
|
|||||||
rsync -av --exclude "*.id" $CARD_MOUNT_POINT/ $BACKUP_PATH
|
rsync -av --exclude "*.id" $CARD_MOUNT_POINT/ $BACKUP_PATH
|
||||||
|
|
||||||
# Geocorrelate photos if a .gpx file exists
|
# Geocorrelate photos if a .gpx file exists
|
||||||
if [ -f "$STORAGE_MOUNT_POINT/$GPX" ]; then
|
if [ -f "$STORAGE_MOUNT_POINT/*.gpx" ]; then
|
||||||
|
GPX=$(ls *.gpx)
|
||||||
cd $STORAGE_MOUNT_POINT
|
cd $STORAGE_MOUNT_POINT
|
||||||
exiftool -overwrite_original -r -ext jpg -geotag "$GPX" -geosync=180 .
|
exiftool -overwrite_original -r -ext jpg -geotag "$GPX" -geosync=180 .
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user