1
Fork 0

Script 'schedule': fix case when PLAYER is a part of 'game_url' or 'result'.

master
vonavi 2014-04-23 00:33:13 +03:00
parent d86663c426
commit afacbfcaea
1 changed files with 3 additions and 0 deletions

View File

@ -184,6 +184,9 @@ info_output_term() {
if [[ -n "$PLAYER" ]]; then
players=$(grep -o "[^ ]*${PLAYER}[^ ]*" <<< "$line")
for name in $players; do
# PLAYER is a part of 'game_url' or 'result'
[[ "$name" =~ ^http:\/\/ || "$name" =~ ^(1-0|0-1|1\/2)$ ]] && continue
line=$(sed -E "s/(${name})/\\$(tput setaf 1)\1\\$(tput sgr0)/g" <<< "$line")
done
fi