home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / bin / gnome-volume-manager-gthumb < prev    next >
Encoding:
Text File  |  2007-03-05  |  469 b   |  17 lines

  1. #!/bin/sh
  2. MOUNT_POINT=$(hal-get-property --udi "$1" --key volume.mount_point)
  3. if test -z "$MOUNT_POINT"; then
  4.   gthumb --import-photos
  5. else
  6.   ROOT=${MOUNT_POINT}
  7.   dcim=$(ls "${ROOT}" | grep -i dcim)
  8.   if [ $? -eq 0 ]; then
  9.     ROOT="${ROOT}/$dcim"
  10.     # if there is only one dir in the dcim directory, enter it
  11.     if test $(/bin/ls -1 "${ROOT}" | wc -l)  -eq 1; then
  12.       ROOT="${ROOT}/$(ls -1 "${ROOT}" | head -n 1)"
  13.     fi
  14.   fi
  15.   exec /usr/bin/gthumb "${ROOT}"
  16. fi
  17.