-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·34 lines (26 loc) · 858 Bytes
/
update.sh
File metadata and controls
executable file
·34 lines (26 loc) · 858 Bytes
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
#!/bin/bash
# validate data
result=`python scripts/validate-regions.py`
if [[ -n $result ]]; then
echo $result
exit 1
fi
result=`python scripts/validate-people.py`
if [[ -n $result ]]; then
echo $result
exit 1
fi
# update data
python scripts/people-json.py > people.json
python scripts/regions-json.py > regions.json
# update stats
echo "# Statistics" > statistics.md
echo "" >> statistics.md
echo "On this page are general statistics about breadth and depth of the dataset. These figures are autogenerated whenever the data is updated." >> statistics.md
echo "" >> statistics.md
python scripts/statistics.py >> statistics.md
echo "" >> statistics.md
echo "[Back to homepage.](/)" >> statistics.md
# update repo
echo "Type a commit message, then press [ENTER]:"
git add . && git commit -m "$(read msg && echo $msg)" && git push origin master