#!/bin/sh
#   Script to handle camera/removable media import for KDE

if [ $# -ne 1 ] ; then
    exit 1
fi

echo $1 | grep -qs '^system:/media/camera'
if [ $? -eq 0 ] ; then
    picasa /StiDevice
    exit 0
fi

echo $1 | grep -qs '^system:/'
if [ $? -eq 0 ] ; then
    MOUNT_POINT=$(echo $1 | sed 's/^system://')
    kio_media_mounthelper -m "$1"
    picasa "$MOUNT_POINT"
    exit 0
fi

echo $1 | grep -qs '^media:/'
if [ $? -eq 0 ] ; then
    MOUNT_POINT=$(echo $1 | sed 's/^media://')
    picasa "/media$MOUNT_POINT"
    exit 0
fi

exit 1

