summaryrefslogtreecommitdiffstats
path: root/games/gnuchess/scripts
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-12-23 04:57:09 +0000
committeredwin <edwin@FreeBSD.org>2004-12-23 04:57:09 +0000
commitf7b066caacd217e1959c47ed83e398d78b54efdc (patch)
tree65d174a15ac29d6068d53231c5e6ab6ec78da212 /games/gnuchess/scripts
parent0d3f7688e7304ed0e59bb63627bfb9cf66c6b906 (diff)
downloadFreeBSD-ports-f7b066caacd217e1959c47ed83e398d78b54efdc.zip
FreeBSD-ports-f7b066caacd217e1959c47ed83e398d78b54efdc.tar.gz
Update port: games/gnuchess (new version 5.07 with optional opening
book support added) Update of port games/gnuchess to version 5.07. Includes support for building and installing opening book (as an OPTION) OPTIONs rule! PR: ports/74441 Submitted by: Conrad J. Sabatier <conrads@cox.net>
Diffstat (limited to 'games/gnuchess/scripts')
-rw-r--r--games/gnuchess/scripts/create_opening_book.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/games/gnuchess/scripts/create_opening_book.sh b/games/gnuchess/scripts/create_opening_book.sh
new file mode 100644
index 0000000..39d4aff
--- /dev/null
+++ b/games/gnuchess/scripts/create_opening_book.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+DISTDIR=$1
+WRKSRC=$2
+
+[ -f ${WRKSRC}/src/book.dat ] && exit 0
+
+builtin echo -e "\nCreating opening book for gnuchess...\n"
+
+cp ${DISTDIR}/book_1.01.pgn.gz ${WRKSRC}/src/book.pgn.gz
+
+cd ${WRKSRC}/src && gunzip -f book.pgn.gz
+
+./gnuchess << END
+book add book.pgn
+quit
+END
+
+[ $? = 0 ] && builtin echo -e "\nBook successfully created!\n"
OpenPOWER on IntegriCloud