File xcrafty of Package crafty
#! /bin/sh
#
# Run xboard with crafty as chess program.
#
# Copyright (c) 1999 SuSE GmbH Nuernberg, Germany. All rights reserved.
#
# Author: Steffen Winterfeldt <wfeldt@suse.de>
#
[ "$DISPLAY" ] || {
echo >&2 "This is not a text mode application!"
exit 63
}
emsg="You\'ll have to install package \'xboard\' first to run xcrafty."
which xboard >/dev/null 2>&1 || {
if tty -s ; then
sh -c "echo >&2 $emsg"
else
xterm +sb -T "xcrafty error" -bg white -fg red -e sh -c "echo $emsg ; read"
fi
exit 42
}
exec xboard -size bulky -fcp crafty -scp crafty "$@" &