#!/bin/sh # Importe the photos and thumbnails from the camera into a directory if [ $# != 1 ] ; then echo photo_import directory >&2 else mkdir -p $1 TMPDIR=/tmp/images-$$ rm -fr $TMPDIR echo \#IMAGES jphoto --directory $TMPDIR images mv $TMPDIR/*.jpg $1/. echo \#THUMBS jphoto --directory $TMPDIR thumbs cd $TMPDIR for th in *.jpg do NAME=`basename $th .jpg` mv $th $1/$NAME.th.jpg done rm -fr $TMPDIR exit 0 fi