#!/bin/sh -f
#--------------------------------------------------------------------
#	$Id: isogmt.in 9656 2012-01-13 18:29:02Z pwessel $
#
#	Copyright (c) 1991-2012 by P. Wessel and W. H. F. Smith
#	See LICENSE.TXT file for copying and redistribution conditions.
#
#	This program is free software; you can redistribute it and/or
#	modify it under the terms of the GNU General Public License as
#	published by the Free Software Foundation; version 2 of the
#	License.
#
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	Contact info: gmt.soest.hawaii.edu
#--------------------------------------------------------------------
#
# isogmt runs a GMT command or script in isolation mode.

if [ $# -eq 0 ]; then
	cat << END >&2
isogmt 4.5.8 - Run GMT command or script in isolation mode

usage: isogmt <command>

	<command> is a single GMT command plus options or an executable script.
END
	exit
fi

export GMT_TMPDIR=`mktemp -d ${TMPDIR:-/tmp}/gmt.XXXXXX`
$*
rm -rf $GMT_TMPDIR
unset GMT_TMPDIR
