forked from GeoNet/delta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·60 lines (42 loc) · 1.83 KB
/
build.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash -x
errcount=0
error_handler () {
echo "Trapped error - ${1:-"Unknown Error"}" 1>&2
(( errcount++ )) # or (( errcount += $? ))
}
trap error_handler ERR
mkdir -p .tmp/geonet-meta/stationxml || exit 255
go build ./tools/stationxml || exit 255
./stationxml -base . -output .tmp/geonet-meta/stationxml/complete.xml
./stationxml -base . -output .tmp/geonet-meta/stationxml/scp.xml \
-active \
-installed \
-operational \
-networks '!(SB|.X)' \
-channels '([EHB][HN][ZNE12])'
./stationxml -base . -output .tmp/geonet-meta/stationxml/iris.xml \
-stations '(KHZ|QRZ|OUZ|HIZ|BKZ|ODZ|BFZ|CTZ|URZ|RPZ|WPVZ)' \
-sensors '(STS-2|CMG-3TB|CMG-40T-60S|FBA-ES-T)' \
-dataloggers '(Q330HR/6|Q4120/6|Q330/3)' \
-channels '([HLV]H[ZNE12]|[HBL]N[ZNE])'
mkdir -p .tmp/geonet-meta/seed/pod || exit 255
go build ./tools/pod || exit 255
for input in .tmp/geonet-meta/stationxml/*.xml; do
output=$(basename $input .xml)
./pod -output .tmp/pod/$output $input
(cd .tmp/pod/$output; tar cfz ../../geonet-meta/seed/pod/$output.tar.gz HDR000)
done
mkdir -p .tmp/geonet-meta/config || exit 255
go build ./tools/impact || exit 255
./impact -base . -channels "[BH]N[ZNE12XY]" -output .tmp/geonet-meta/config/impact.json
mkdir -p .tmp/geonet-meta/config/rinex || exit 255
go build ./tools/rinexml || exit 255
./rinexml -install ./install -network ./network -output .tmp/geonet-meta/config/gnsssitexml
mkdir -p .tmp/geonet-meta/config/gloria || exit 255
go build ./tools/gloria || exit 255
./gloria --install install --network network -output .tmp/geonet-meta/config/gloria
mkdir -p .tmp/geonet-meta/config/sit || exit 255
go build ./tools/sit || exit 255
./sit -install install -network network -asset assets -output .tmp/geonet-meta/config/sit
exit $errcount
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4