4 # Usage: cat game |pxboard [xboard-options]
5 # or (in rn or xrn) save an article to: |pxboard [xboard-options]
7 # This script saves its standard input to a temporary file and invokes
8 # "xboard -loadGameFile file &" on the file. Although it is possible
9 # to pipe games directly into xboard using "xboard -lgf -", this
10 # script is nicer in two ways: (1) xboard can seek on the temporary
11 # file, so the popup game list, Load Previous Game, and Reload Same
12 # Game all work. (2) The script runs xboard in the background and
13 # exits. So if you save a news article by piping it into this script,
14 # you immediately get back control of your news reader.
16 # The script turns on -noChessProgram mode by default. If you want a
17 # chess program started, give the -xncp option.
19 tmp=`mktemp "${TMPDIR:-/tmp}/pxboard.$$.XXXXXX"` || exit 1
21 ( xboard -ncp -lgf "$tmp" "$@" ; rm "$tmp" ) &