#! /bin/sh # # Synopsis: Show a go game depending on available interface # Author : Jan van der Steen (Jan.van.der.Steen@cwi.nl) # Date : Thu Jan 26 21:31:27 MET 1995 # # Since we can browse the Web either from a fancy display running # X-windows, or from a less capable screen like a # vt100 emulator, # we do some testing to either fire up a viewer or simply write the # file to /tmp. if [ "_${DISPLAY}_" = "__" ] then # # No graphic capabilities, write the data to file # cat $1 > /tmp/$$.sgf echo "showsgf: Left go game in /tmp/$$.sgf" else # # Graphic capabilities, launch a go game editor # cgoban -edit $1 fi exit 0