From 3885bd7948c5f508b04fbeee2085ca2ed36a9ba8 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Mon, 30 Dec 2024 09:51:04 -0500 Subject: [PATCH] feat: fast-chess-tag can save multiple PGNs for the same players it will use number indices instead of asking to delete the first PGN. --- contrib/fast-chess-tag.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/fast-chess-tag.sh b/contrib/fast-chess-tag.sh index fa3f815..d5e645a 100755 --- a/contrib/fast-chess-tag.sh +++ b/contrib/fast-chess-tag.sh @@ -59,9 +59,13 @@ mkdir -p games PGN=games/"$TAG1"__"$TAG2".pgn rm -f engine1 engine2 -if [ -f "$PGN" ]; then - rm -i "$PGN" -fi + +IDX=1 +while [ -e "$PGN" ]; do + PGN=games/"$TAG1"__"$TAG2"__"$IDX".pgn + IDX=$(( $IDX + 1 )) +done +printf "using pgn output: %s\n" "$PGN" > /dev/stderr git checkout "$TAG1" cargo build --release