summaryrefslogtreecommitdiff
path: root/sources/potlatch/update.sh
blob: 8ba9956c365da9c6bab6f95cb25ac5a70de23404 (plain)
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
#!/bin/sh
#
#  Taginfo source: Potlatch
#
#  update.sh DIR
#

set -e

DIR=$1

if [ "x" = "x$DIR" ]; then
    echo "Usage: update.sh DIR"
    exit 1
fi

echo -n "Start potlatch: "; date

DATABASE=$DIR/taginfo-potlatch.db

rm -f $DATABASE

echo "Getting resources..."
if [ -d $DIR/resources ]; then
    svn update $DIR/resources
else
    svn checkout http://svn.openstreetmap.org/applications/editors/potlatch2/resources $DIR/resources
fi

echo "Running pre.sql..."
sqlite3 $DATABASE <pre.sql

echo "Running import..."
./import_potlatch.rb $DIR

echo "Running post.sql..."
sqlite3 $DATABASE <post.sql

echo -n "Done potlatch: "; date