-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfetch
executable file
·47 lines (36 loc) · 849 Bytes
/
fetch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash -euo pipefail
venue="$1"
year="$2"
show="$3"
function edit_if_diff {
local file="$1"
git add -N $file
printf '\e[35m** %s\e[0m\n' $file
git diff --exit-code $file >/dev/null || \
subl -w "$@"
}
function show_diff {
local file="$1"
git add -N $file
printf '\e[35m** %s\e[0m\n' $file
git diff $file
read -n1
echo ''
}
python fetch_scoreboard.py $venue $year $show
edit_if_diff countries.toml
edit_if_diff contests.toml
show_diff shows/$year.toml
show_diff artists/$year.toml
edit_if_diff singers/$year.toml artists/$year.toml
edit_if_diff songs/$year.toml
show_diff scores/$year-$show.toml
git add \
countries.toml \
contests.toml \
shows/$year.toml \
artists/$year.toml \
singers/$year.toml \
songs/$year.toml \
scores/$year-$show.toml
pytest