#!/bin/sh
IDNUM="$1"

if [ -z "$IDNUM" ]
then
	echo ID number must be specified as the first parameter
	exit 1
fi

if [ -f callinTime ]
then
	echo Removing callinTime override file
	rm -f callinTime
fi

IDENT="-i $IDNUM"
DIRPART="$IDNUM"

echo Re-creating workspace area

if [ -d "workspace" ]
then
	rm -rf workspace
fi

mkdir workspace

echo Executing SCP
exec timelimit -pq -s 9 -t 600 scp $IDENT "$IDNUM"@ggsmac:runme workspace/runme
#exec timelimit -pq -s 9 -t 600 scp $IDENT -P 10501 vehicle@smactest:$DIRPART/runme workspace/runme

