summaryrefslogtreecommitdiff
path: root/sources/potlatch/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sources/potlatch/update.sh')
-rwxr-xr-xsources/potlatch/update.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/sources/potlatch/update.sh b/sources/potlatch/update.sh
index 8ba9956..748ff4a 100755
--- a/sources/potlatch/update.sh
+++ b/sources/potlatch/update.sh
@@ -9,32 +9,37 @@ set -e
DIR=$1
+DATECMD='date +%Y-%m-%dT%H:%M:%S'
+
if [ "x" = "x$DIR" ]; then
echo "Usage: update.sh DIR"
exit 1
fi
-echo -n "Start potlatch: "; date
+echo "`$DATECMD` Start potlatch..."
DATABASE=$DIR/taginfo-potlatch.db
rm -f $DATABASE
-echo "Getting resources..."
+echo "`$DATECMD` Updating 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..."
+echo "`$DATECMD` Running init.sql..."
+sqlite3 $DATABASE <../init.sql
+
+echo "`$DATECMD` Running pre.sql..."
sqlite3 $DATABASE <pre.sql
-echo "Running import..."
+echo "`$DATECMD` Running import..."
./import_potlatch.rb $DIR
-echo "Running post.sql..."
+echo "`$DATECMD` Running post.sql..."
sqlite3 $DATABASE <post.sql
-echo -n "Done potlatch: "; date
+echo "`$DATECMD` Done potlatch."