#!/bin/sh
#
# This belongs to dsh.py version 0.1.1
#
# First parameter is a temporary filename, the rest is a command to be 
# executed
#
# First we wait till the temp file exists,
# then execute the command and
# then remove the temp file and return with the return value of the
# command.
# 

file=$1
shift

while ! test -f $file ; do true ; done

$*

retval=$?

rm $file

exit $retval

