freebsd-ports/biology/tinker/files/tview
Mario Sergio Fujikawa Ferreira dfd533edaa Update to 3.9
PR:		30398
Submitted by:	MAINTAINER
2001-09-13 01:13:52 +00:00

21 lines
456 B
Bash

#!/bin/sh
# Determine if X is running
if [ -z $DISPLAY ]; then
echo You must be running X for this.
else
# Try to determine the color depth of the X server
DEPTH=`xwininfo -root | grep Depth | awk '{print $2}'`
if [ $DEPTH = 24 -o $DEPTH = 32 ]; then
PROGRAM=tview-32
elif [ $DEPTH = 16 ]; then
PROGRAM=tview-16
elif [ $DEPTH = 8 ]; then
PROGRAM=tview-8
else
echo Can not determine color depth of Display $DISPLAY
fi
exec $PROGRAM $@
fi