#!/bin/sh # Copyright (c) 2009 Chris Miceli (cmicel1@cct.lsu.edu) # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # Header while getopts d arg do case $arg in d) echo "This program tests the functionality of the default file adaptor to remove files." exit 0;; esac done # Create the temporary file TMPFILE=`mktemp -t saga.adaptor.XXXXXX` || exit 1 # Verify existence if ! test -e $TMPFILE then echo "Could not create temporary file!" exit 1 fi # Remove the temporary file `$SAGA_LOCATION/bin/saga-file remove file://localhost/$TMPFILE` # Verify non-existence if test -e $TMPFILE then echo "Saga could not successfully remove the file!" #Clean up temporaries rm $TMPFILE exit 1 else echo "Success" exit 0; fi