-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·37 lines (31 loc) · 819 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·37 lines (31 loc) · 819 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
35
36
37
#! /bin/bash
set -o errexit -o nounset
if [ $# -ne 2 ]; then
echo "Usage: $0 DATA_DIR EXTRACT"
exit 1
fi
# a lot of files are quite big, and
# in my setup the main dir is in a partition in a small SSD big enough for the DB
# but not much more
# so all these big data files are stored in anothere directory
data_dir=$1
extract=$2
make prepare DATA_DIR=$data_dir
# as the data_dir is outside this repo, we can't have a Makefile there
# so we do this as indempotent as possible
(
cd data/osm
dst="$data_dir/data/osm"
./pull_osm_data.ay $extract $dst
ln -sfv "$dst/$(basename ${extract}-latest.osm.pbf)" .
)
# TODO: most probably by moving all the data to osm-carto/data
(
cd data
ln -svf ../osm-carto/data/* .
)
# TODO: ditto
(
cd osm-carto/data
ln -svf ../../data/height .
)