Script 'game-add': update PGN links.

This commit is contained in:
vonavi 2014-11-08 11:44:23 +03:00
parent 9d72218a4c
commit 15c7d82764

View File

@ -229,7 +229,8 @@ trap "rm ${tmp_ini} ${tmp_ini}.prev ${tmp_pgn}" EXIT
# Download PGN file # Download PGN file
[[ $1 =~ ^(http://[^/]*)/([^/]*) ]] [[ $1 =~ ^(http://[^/]*)/([^/]*) ]]
pgn_url=${BASH_REMATCH[1]}/${BASH_REMATCH[2]::8}/pgn # Link to annotated PGN
pgn_url=${BASH_REMATCH[1]}/game/pgn/${BASH_REMATCH[2]::8}.pgn
wget -q "$pgn_url" -O $tmp_pgn || die "PGN file not found." wget -q "$pgn_url" -O $tmp_pgn || die "PGN file not found."
game_get_players game_get_players