From 9dd00b2eb035a8aaef523806bdfccd2fa3981902 Mon Sep 17 00:00:00 2001 From: vonavi Date: Sat, 13 Dec 2014 21:48:24 +0300 Subject: [PATCH] Script 'game-add': fix the length of game record. --- game-add | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game-add b/game-add index 1dc0af2..44e416f 100755 --- a/game-add +++ b/game-add @@ -277,8 +277,8 @@ function game_update_info { local result= game_get_result - local spaces=$(( length_max - rec_length )) - local sep=$(printf "%${spaces}s" " ") + local spaces=$(( length_max - rec_length )) sep= + (( spaces != 0 )) && sep=$(printf "%${spaces}s" " ") echo "Updating file ${tour_info}..." sed -E -i.orig \ "s|^${date_re}( +${white} +- +${black}).*|${game_date}\1${sep}${result}|" \