#!/bin/sh

## @file
## @brief Camera import hook script
##

# shellcheck disable=2154
if [ "$ACTION" = "download" ]
then
	printf '%s\n' "$ARGUMENT" >> /tmp/geeqie-camera-import-files

elif [ "$ACTION" = "stop" ]
then
	zenity --info --title="Geeqie camera download" --text="Import ended" --timeout=5 --window-icon=/usr/local/share/icons/hicolor/scalable/apps/geeqie.svg 2>/dev/null
	if [ -f /tmp/geeqie-camera-import-files ]
	then
		rm /tmp/geeqie-camera-import-files
	fi
fi

exit 0
