Scripts: fix the increment operator.
This commit is contained in:
parent
ca0a88d24e
commit
e2dca73597
6
game-add
6
game-add
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2014 Vladimir Ivanov <ivvl82@gmail.com>
|
# Copyright 2014, 2015 Vladimir Ivanov <ivvl82@gmail.com>
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
REPO_DIR=
|
REPO_DIR=
|
||||||
@ -271,7 +271,7 @@ function game_store_pgns {
|
|||||||
[[ -n $old_pgns ]] && pgn_index=$(wc -l <<< "$old_pgns")
|
[[ -n $old_pgns ]] && pgn_index=$(wc -l <<< "$old_pgns")
|
||||||
fi
|
fi
|
||||||
for pgn in ${TMP_PGN_FILES[@]}; do
|
for pgn in ${TMP_PGN_FILES[@]}; do
|
||||||
(( pgn_index += 1 ))
|
(( pgn_index++ ))
|
||||||
echo "Storing file ${game_dir}/${pgn_index}.pgn..."
|
echo "Storing file ${game_dir}/${pgn_index}.pgn..."
|
||||||
cp $pgn ${game_dir}/${pgn_index}.pgn
|
cp $pgn ${game_dir}/${pgn_index}.pgn
|
||||||
done
|
done
|
||||||
@ -313,7 +313,7 @@ function game_get_result {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
result+=" $res"
|
result+=" $res"
|
||||||
(( res_index += 1 ))
|
(( res_index++ ))
|
||||||
done <<< "$(echo -e "$ply_names")"
|
done <<< "$(echo -e "$ply_names")"
|
||||||
|
|
||||||
$ADD_GAMES && [[ -n $res_old ]] && result=" ${res_old}${result}"
|
$ADD_GAMES && [[ -n $res_old ]] && result=" ${res_old}${result}"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2014 Vladimir Ivanov <ivvl82@gmail.com>
|
# Copyright 2014, 2015 Vladimir Ivanov <ivvl82@gmail.com>
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
REPO_DIR=
|
REPO_DIR=
|
||||||
@ -32,7 +32,7 @@ function parse_tour_info {
|
|||||||
local result=${BASH_REMATCH[5]}-${BASH_REMATCH[6]}
|
local result=${BASH_REMATCH[5]}-${BASH_REMATCH[6]}
|
||||||
local round=$(echo "($tour - 1)/($ply_count - 1) + 1" | bc)
|
local round=$(echo "($tour - 1)/($ply_count - 1) + 1" | bc)
|
||||||
parse_to_ini
|
parse_to_ini
|
||||||
((game_counter += 1))
|
(( game_counter++ ))
|
||||||
fi
|
fi
|
||||||
done <<< "$tour_info"
|
done <<< "$tour_info"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user