- if [[ -e ${DEST_DIR}/$i ]]; then
- echo "The file ${DEST_DIR}/$i already exists."
- else
-
- orientation=$(exif $i \
- | grep ^Orientation \
- | head -1 \
- | sed -e "s/^[^|]*|//" \
- | sed -e "s/ *$//")
-
- case ${orientation} in
- "top - left")
- rotation_cmd=""
- ;;
-
- "right - top")
- rotation_cmd="-rotate 90"
- ;;
-
- "left - bottom")
- rotation_cmd="-rotate 270"
- ;;
-
- *)
- rotation_cmd=""
- echo "Unknown orientation \"${orientation}\" !"
- ;;
- esac
-
- if [[ -f ${i/JPG/MOV} ]]; then
- CAPTION_PARAMS="-font vera-sans -pointsize 24 -fill white -annotate +10+32 Video"
+ if [[ $(file $i | grep image) ]]; then
+ if [[ -e ${DEST_DIR}/$i ]]; then
+ echo "The file ${DEST_DIR}/$i already exists."