#!/bin/bash

function errmsg {
  echo ""
  echo "Please supply the name of a restart file in the photos directory as a command line argument."
  echo ""
}

function check_okay {
	if [ $? -ne 0 ]
	then
	  errmsg
		exit 1
	fi
}

if test -z "$1"
then
  errmsg
  exit 1
fi

echo $1
cp photos/$1 restart_photo
check_okay
date;./star;date
