1
Fork 0

Script 'schedule': change the default value of REPO.

master
vonavi 2014-04-28 13:45:40 +03:00
parent 4d9f64d98b
commit bfa8754169
1 changed files with 10 additions and 8 deletions

View File

@ -2,7 +2,8 @@
# Copyright 2014 Vladimir Ivanov <ivvl82@gmail.com> # Copyright 2014 Vladimir Ivanov <ivvl82@gmail.com>
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
REPO="https://raw.githubusercontent.com/fat0troll/lorchess/master" # REPO="https://raw.githubusercontent.com/fat0troll/lorchess/master"
REPO="`dirname $0`"
TOURNAMENT="2014/1-tabiyas" TOURNAMENT="2014/1-tabiyas"
# Version information # Version information
@ -22,9 +23,10 @@ Usage: $argv0 [options] [tours]
\`tour_info' is found. By default, only unaccomplished games are \`tour_info' is found. By default, only unaccomplished games are
listed. listed.
Inner variable REPO points to the root of repository; REPO is a URL Inner variable REPO points to the root of repository; its default
link, absolute or relative path. Inner variable TOURNAMENT specifies value of \`dirname \$0\` can be replaced by a URL link, absolute or
the sub-directory of tournament. relative path. Inner variable TOURNAMENT specifies the sub-directory
of tournament.
Options: Options:
-a List accomplished games too -a List accomplished games too
@ -78,9 +80,9 @@ show_tour_sequence() {
if keep_game_info "$line"; then if keep_game_info "$line"; then
# Fix result # Fix result
case "$result" in case "$result" in
1:0) result="1-0" ;; "1:0") result="1-0" ;;
0:1) result="0-1" ;; "0:1") result="0-1" ;;
0.5:0.5) result="1/2" ;; "0.5:0.5") result="1/2" ;;
esac esac
# Store the link to game in 'game_url' # Store the link to game in 'game_url'
@ -130,7 +132,7 @@ get_tour_dates() {
if [[ "$1" =~ "Время проведения:"\ *($date_re)\ *[-—]\ *($date_re) ]]; then if [[ "$1" =~ "Время проведения:"\ *($date_re)\ *[-—]\ *($date_re) ]]; then
date_beg="${BASH_REMATCH[1]}" date_end="${BASH_REMATCH[2]}" date_beg="${BASH_REMATCH[1]}" date_end="${BASH_REMATCH[2]}"
# Use short dates # Use short dates
date_beg="${date_beg:0:5}" date_end="${date_end:0:5}" date_beg="${date_beg::5}" date_end="${date_end::5}"
return 0 return 0
else else
return 1 return 1