Allow to execute `tour_parse' from different directories.
This commit is contained in:
parent
daa9df82c0
commit
f743769912
@ -8,6 +8,8 @@ white='(.+)'
|
|||||||
black='(.+)'
|
black='(.+)'
|
||||||
result='((1|0|0\.5):(1|0|0\.5))'
|
result='((1|0|0\.5):(1|0|0\.5))'
|
||||||
|
|
||||||
|
script_path=`dirname $0`
|
||||||
|
|
||||||
# Directories to search `tour_info' in
|
# Directories to search `tour_info' in
|
||||||
if [[ $# != 0 ]]; then
|
if [[ $# != 0 ]]; then
|
||||||
tour_dirs=()
|
tour_dirs=()
|
||||||
@ -16,10 +18,10 @@ if [[ $# != 0 ]]; then
|
|||||||
number=0"$number"
|
number=0"$number"
|
||||||
number=${number:(-2)}
|
number=${number:(-2)}
|
||||||
|
|
||||||
tour_dirs+=($tournament/tour_$number)
|
tour_dirs+=($script_path/$tournament/tour_$number)
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
tour_dirs=($tournament/tour_*)
|
tour_dirs=($script_path/$tournament/tour_*)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for dir in "${tour_dirs[@]}"; do
|
for dir in "${tour_dirs[@]}"; do
|
||||||
|
Loading…
Reference in New Issue
Block a user