X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=scripts%2Fcamera-download;fp=scripts%2Fcamera-download;h=0000000000000000000000000000000000000000;hb=fa37c01979686fe0a32001b8f2687b248c7eb16a;hp=5734b6747b6d9654ccfd1b9e9d8702195e328491;hpb=2088f7ccfe5a78c7410a38d725c1ff6884864429;p=hvutilities.git diff --git a/scripts/camera-download b/scripts/camera-download deleted file mode 100755 index 5734b67..0000000 --- a/scripts/camera-download +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -PROG_NAME=$(basename $0) - -MOUNTPOINT=/media/camera -DIRNAME=$(date +%Y%m%d-%Hh%M) - -print_usage() -{ - echo "Usage: ${PROG_NAME} [OPTION]..." - echo - echo "Copy and delte images from digital camera." - echo - echo "Options:" - echo " -h display this help and exit" - exit 0 -} - -while getopts "h" flag ;do - case ${flag} in - h) - print_usage - ;; - ?) - echo "${PROG_NAME}: Invalid option: ${OPTARG}." - echo "Try \`${PROG_NAME} -h' for more information." - exit 1 - ;; - esac -done -shift `expr "${OPTIND}" - 1` - -# `$#' now represents the number of arguments after the options. -# `$1' is the first argument, etc. -if [ $# -ne 0 ]; then - echo "${PROG_NAME}: Too many arguments." - echo "Try \`${PROG_NAME} -h' for more information." - exit 1 -fi - - -if ! mount | grep -q ${MOUNTPOINT}; then - mount ${MOUNTPOINT} || exit 1 -fi - -mkdir -p ~/camera/${DIRNAME} && - -mv ${MOUNTPOINT}/dcim/???_???? ~/camera/${DIRNAME} - -umount /media/camera - -exit $?