diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-24 16:15:56 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-24 16:15:56 +0100 |
commit | ceb79b1e639597a930d466e34f3d113f6e51c3d4 (patch) | |
tree | ca704d498cc15e05b3eebe97b1313532b683f876 /sources/master/update.sh | |
parent | 38095b40997a08a0b7e5155da442fa77165ce556 (diff) | |
download | taginfo-ceb79b1e639597a930d466e34f3d113f6e51c3d4.tar taginfo-ceb79b1e639597a930d466e34f3d113f6e51c3d4.tar.gz |
Add history database to update scripts
Diffstat (limited to 'sources/master/update.sh')
-rwxr-xr-x | sources/master/update.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/master/update.sh b/sources/master/update.sh index e90571d..d030134 100755 --- a/sources/master/update.sh +++ b/sources/master/update.sh @@ -25,6 +25,7 @@ fi echo "Running with ruby set as '${EXEC_RUBY}'" DATABASE=$DIR/taginfo-master.db +HISTORYDB=$DIR/taginfo-history.db echo "`$DATECMD` Create search database..." @@ -33,10 +34,17 @@ $EXEC_RUBY -pe "\$_.sub!(/__DIR__/, '$DIR')" search.sql | sqlite3 $DIR/taginfo-s rm -f $DATABASE +echo "`$DATECMD` Create master database..." sqlite3 $DATABASE <languages.sql $EXEC_RUBY -pe "\$_.sub!(/__DIR__/, '$DIR')" master.sql | sqlite3 $DATABASE $EXEC_RUBY -pe "\$_.sub!(/__DIR__/, '$DIR')" interesting_tags.sql | sqlite3 $DATABASE $EXEC_RUBY -pe "\$_.sub!(/__DIR__/, '$DIR')" interesting_relation_types.sql | sqlite3 $DATABASE +echo "`$DATECMD` Updating history database..." +if [ ! -e $HISTORYDB ]; then + sqlite3 $HISTORYDB < history_init.sql +fi +$EXEC_RUBY -pe "\$_.sub!(/__DIR__/, '$DIR')" history_update.sql | sqlite3 $HISTORYDB + echo "`$DATECMD` Done master." |