Script 'game-add': make variable 'pgn_dir' global.

This commit is contained in:
vonavi 2014-09-06 14:30:14 +04:00
parent 51ae92184c
commit cc48843bae

View File

@ -161,7 +161,7 @@ function game_add_to_repo {
local pgn_date=$(sed -En "s/\[Date \"([^\"]*)\"\]/\1/p" < "$tmp_pgn") local pgn_date=$(sed -En "s/\[Date \"([^\"]*)\"\]/\1/p" < "$tmp_pgn")
local pgn_date=$(tr "." "-" <<< "$pgn_date") local pgn_date=$(tr "." "-" <<< "$pgn_date")
local pgn_dir="${REPO_DIR}/${TOURNAMENT}/tours/${TOUR}/${pgn_date}-${white}-vs-${black}" pgn_dir=${REPO_DIR}/${TOURNAMENT}/tours/${TOUR}/${pgn_date}-${white}-vs-${black}
[[ -d $pgn_dir ]] && die "Directory ${pgn_dir} already exist." [[ -d $pgn_dir ]] && die "Directory ${pgn_dir} already exist."
echo "Creating directory ${pgn_dir}..." echo "Creating directory ${pgn_dir}..."