summaryrefslogtreecommitdiffstats
path: root/src/utilities/hotplug/digikam-camera
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-11-22 18:41:30 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-11-22 20:55:03 +0900
commit5bed6e4a4c916a97f8fe4d1b07f7eecf4d733b90 (patch)
treef89cc49efc9ca1d0e1579ecb079ee7e7088ff8c8 /src/utilities/hotplug/digikam-camera
parent0bfbf616d9c1fd7abb1bd02732389ab35e5f8771 (diff)
downloaddigikam-5bed6e4a4c916a97f8fe4d1b07f7eecf4d733b90.tar.gz
digikam-5bed6e4a4c916a97f8fe4d1b07f7eecf4d733b90.zip
Rename 'digikam' folder to 'src'
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit ee0d99607c14cb63d3ebdb3a970b508949fa8219)
Diffstat (limited to 'src/utilities/hotplug/digikam-camera')
-rwxr-xr-xsrc/utilities/hotplug/digikam-camera40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/utilities/hotplug/digikam-camera b/src/utilities/hotplug/digikam-camera
new file mode 100755
index 00000000..10b2fe3f
--- /dev/null
+++ b/src/utilities/hotplug/digikam-camera
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+action="$1"; shift;
+
+case "$action" in
+detect)
+ cmdoption=--detect-camera
+ dcopcall=detectCamera
+ ;;
+storage)
+ cmdoption=--download-from
+ dcopcall=downloadFrom
+ args="$@"
+ ;;
+*)
+ echo "${0##*/}: wrong action. Usage"
+ echo " ${0##*/} detect # for gphoto2 supported cameras"
+ echo " ${0##*/} storage <url> # for usbdisk or directries with images"
+ exit 1
+ ;;
+esac
+
+for app in `dcop`; do
+ case "$app" in
+ digikam-*)
+ echo "recycling running $app: $dcopcall $@"
+ if test -z "$args"; then
+ exec dcop "$app" camera "$dcopcall"
+ else
+ exec dcop "$app" camera "$dcopcall" "$args"
+ fi
+ ;;
+ esac
+done;
+echo "starting digikam with $cmdoption $args"
+if test -z "$args"; then
+ exec digikam "$cmdoption"
+else
+ exec digikam "$cmdoption" "$args"
+fi