:
#	@(#) scosh 23.6 91/12/06 
#
#	Copyright (C) 1990-1991 The Santa Cruz Operation, Inc.
#		All Rights Reserved.
#	The information in this file is provided for the exclusive use of
#	the licensees of The Santa Cruz Operation, Inc.  Such users have the
#	right to use, modify, and incorporate this code into other products
#	for purposes authorized by the license agreement provided they include
#	this notice and the associated copyright notice with any such product.
#	The information in this file is provided "AS IS" without warranty.
#

SHELL=/bin/sh; export SHELL
if test "$1" = "-scosh"
	then eval `tset -m ansi:ansi -m :\?${TERM:-ansi} -r -s -Q`
fi
VERSION="1.0.0"
if test "$1" = "-v"; then
	echo "SCO Shell Version "$VERSION""
	exit
fi

#
# Environment vars for OA.
#
SCOLIB=${SCOLIB-"/usr/lib/sco"};		export SCOLIB
SCOSHLIB=${SCOSHLIB-"/usr/lib/scosh"}
OALIB=/usr/lib/scosh
export SCOSHLIB OALIB

# run an app
runapp()
{
	$*
	exit $?
}

if test _$1 != _"-scosh" -a $# -ge 1; then
	if test -x $SCOSHLIB/$1; then
		command="$SCOSHLIB/$1"
		shift
		runapp $command $*
		exit
	else
		echo "$SCOSHLIB/$1: command not found"
		exit
	fi
fi

runapp $SCOSHLIB/desktop
