#!/bin/bash
# usage:
#   files-moveno2nd1 file ext2 directory
#
# helper script for files-moveno2nd
#
# move all file to directory if there is no
# supplementary file with other extension ext2 
# (e.g. calibration file or bitmap file)

if [ $# -ne 3 ]; then
  echo "usage: files-moveno2nd1 file ext2 directory"
  exit
fi

file2=${1%.*}.$2

if [ ! -f "$file2" ]; then
	echo $file2 does not exist -- move $1 to $3
	mv "$1" "$3"
fi
