Script 'schedule': allow re-direction in URLs.

This commit is contained in:
vonavi 2014-04-30 00:53:02 +03:00
parent 1ff814c2d3
commit f98a1778cb

View File

@ -72,7 +72,7 @@ fetch_tour_info() {
# (--write-out '\n') is important and allows one to read the last # (--write-out '\n') is important and allows one to read the last
# line with no trailing '\n' # line with no trailing '\n'
local info_url="${REPO}/${TOURNAMENT}/tours/${tour}/tour_info" local info_url="${REPO}/${TOURNAMENT}/tours/${tour}/tour_info"
tour_info="$(curl -q --fail --silent --write-out '\n' $info_url)" tour_info="$(curl -q --fail --location --silent --write-out '\n' $info_url)"
return `[[ -n "$tour_info" ]]` return `[[ -n "$tour_info" ]]`
} }
@ -178,7 +178,7 @@ store_game_url() {
[[ "$line" =~ "[Site \""([a-z]+:[^\"]+)"\"]" ]] [[ "$line" =~ "[Site \""([a-z]+:[^\"]+)"\"]" ]]
game_url="${BASH_REMATCH[1]}" game_url="${BASH_REMATCH[1]}"
[[ -n "$game_url" ]] && break [[ -n "$game_url" ]] && break
done <<< "$(curl -q --fail --silent $pgn_url)" done <<< "$(curl -q --fail --location --silent $pgn_url)"
} }
info_output_term() { info_output_term() {