forked from OpenBeta/openbeta-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
refresh-db.sh
executable file
·44 lines (31 loc) · 913 Bytes
/
refresh-db.sh
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
#!/bin/bash
# Download seed files and start seeding
# Syntax: ./refresh-db.sh [full]
# Specify 'full' to download the entire data set.
rm -rf tmp
mkdir tmp
cd tmp
GITHUB="https://raw.githubusercontent.com/OpenBeta/climbing-data/main"
wget --content-disposition \
${GITHUB}/openbeta-routes-westcoast.zip
if [[ "$1" == "full" ]];
then
wget --content-disposition \
${GITHUB}/openbeta-routes-mountains2.zip
wget --content-disposition \
${GITHUB}/openbeta-routes-mountains1.zip
wget --content-disposition \
${GITHUB}/openbeta-routes-ca.zip
wget --content-disposition \
${GITHUB}/openbeta-routes-northeast.zip
wget --content-disposition \
${GITHUB}/openbeta-routes-southeast.zip
wget --content-disposition \
${GITHUB}/openbeta-routes-midwest.zip
fi
unzip '*.zip'
cd ..
export CONTENT_BASEDIR=./tmp
echo "NODE_OPTIONS=${NODE_OPTIONS}"
yarn seed-usa
yarn add-countries