1
Fork 0

Script 'game-add': slight changes done.

master
vonavi 2014-12-14 18:00:28 +03:00
parent f98e5604c0
commit f080fa0208
1 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ function game_get_info {
game_get_names
# Select the names of two players
local players=( $(echo -en "$ply_names" | sed "s/ /\\"$'\n'"/" | sort -u) )
local players=( $(echo -en "${ply_names// /\n}" | sort -u) )
[[ ${#players[@]} == 2 ]] || die "Players of the games are not the same."
# Find the white and black players
@ -132,7 +132,7 @@ function game_get_names {
# Make an associative array from Lichess nicks to players' names
game_parse_config
local sections=$(grep -o "config_section_player[0-9]*" $tmp_ini)
declare -A NAMES=()
declare -A NAMES
for sect in $sections; do
eval $sect
NAMES+=( [$lichess]=$name )