File indexing completed on 2025-01-05 03:51:24
0001 #!/bin/sh 0002 0003 # SPDX-FileCopyrightText: 2003-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com> 0004 # 0005 # SPDX-License-Identifier: BSD-3-Clause 0006 0007 action="$1"; shift; 0008 0009 case "$action" in 0010 downloadFrom) 0011 cmdoption=--download-from 0012 dcopcall=org.kde.digikam.downloadFrom 0013 args="$@" 0014 ;; 0015 downloadFromUdi) 0016 cmdoption=--download-from-udi 0017 dcopcall=org.kde.digikam.downloadFromUdi 0018 args="$@" 0019 ;; 0020 detectCamera) 0021 cmdoption=--detect-camera 0022 dcopcall=detectCamera 0023 ;; 0024 *) 0025 echo "${0##*/}: wrong action. Usage" 0026 echo " ${0##*/} downloadFrom <path> # for directories with images" 0027 echo " ${0##*/} downloadFromUdi <udi> # for devices with images" 0028 echo " ${0##*/} detect # for gphoto2 supported cameras" 0029 exit 1 0030 ;; 0031 esac 0032 0033 for app in `qdbus`; do 0034 case "$app" in 0035 org.kde.digikam-*) 0036 echo "recycling running $app: $dcopcall $@" 0037 if test -z "$args"; then 0038 exec qdbus "$app" "/Digikam" "$dcopcall" 0039 else 0040 exec qdbus "$app" "/Digikam" "$dcopcall" "$args" 0041 fi 0042 break 0043 ;; 0044 esac 0045 done; 0046 echo "starting digikam with $cmdoption $args" 0047 if test -z "$args"; then 0048 exec digikam "$cmdoption" 0049 else 0050 exec digikam "$cmdoption" "$args" 0051 fi