Add exit code and some slight changes.
This commit is contained in:
parent
1b2cb0e255
commit
9d20d77cf5
10
schedule
10
schedule
@ -4,7 +4,7 @@ repo=fat0troll/lorchess
|
|||||||
tournament=autumn2013
|
tournament=autumn2013
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
digit='[[:digit:]]'
|
digit='[[:digit:]]\+'
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
cyan='\\033[01;36m'
|
cyan='\\033[01;36m'
|
||||||
@ -36,11 +36,13 @@ for tour in $@; do
|
|||||||
curl -q --silent $url | while read line; do
|
curl -q --silent $url | while read line; do
|
||||||
if [[ -z $line ]]; then
|
if [[ -z $line ]]; then
|
||||||
echo
|
echo
|
||||||
elif [[ -z $name || `echo "$line" | egrep "Тур|=|Время|$name"` ]];then
|
elif [[ -z $name || $(egrep "Тур|=|Время|$name" <<< "$line") ]]; then
|
||||||
# Colorize output
|
# Colorize output
|
||||||
line=$(echo "$line" | sed "s/${digit}/${cyan}\0${restore}/g")
|
line=$(sed "s/${digit}/${cyan}\0${restore}/g" <<< "$line")
|
||||||
[[ -n $name ]] && line=$(echo "$line" | sed "s/${name}/${red}\0${restore}/g")
|
[[ -n $name ]] && line=$(sed "s/${name}/${red}\0${restore}/g" <<< "$line")
|
||||||
echo -e $line
|
echo -e $line
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user