diff options
author | Jochen Topf <jochen@topf.org> | 2015-02-26 16:00:16 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2015-02-26 16:00:16 +0100 |
commit | 128e7ac9bf397539834148ca9c7b58fd44cbfbf6 (patch) | |
tree | cc7b0d672c402a8d2c527857fd40182bf25d5e74 | |
parent | 39d50ae3b23758e9f2817ccbbec0ca86712b6e14 (diff) | |
download | taginfo-128e7ac9bf397539834148ca9c7b58fd44cbfbf6.tar taginfo-128e7ac9bf397539834148ca9c7b58fd44cbfbf6.tar.gz |
Run 'similarity' binary from db update script if it is available.
This also introduces a 'bindir' config setting which must contain
the directory where the binaries such as 'tagstats' and 'similarity'
live. This setting will replace the current 'tagstats' setting in
the future.
-rwxr-xr-x | sources/db/update.sh | 8 | ||||
-rw-r--r-- | taginfo-config-example.json | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sources/db/update.sh b/sources/db/update.sh index f003426..3e42094 100755 --- a/sources/db/update.sh +++ b/sources/db/update.sh @@ -46,6 +46,7 @@ width=`../../bin/taginfo-config.rb geodistribution.width` height=`../../bin/taginfo-config.rb geodistribution.height` min_tag_combination_count=`../../bin/taginfo-config.rb sources.master.min_tag_combination_count 1000` +BINDIR=`../../bin/taginfo-config.rb sources.db.bindir ../../tagstats` TAGSTATS=`../../bin/taginfo-config.rb sources.db.tagstats ../../tagstats/tagstats` if [ -f $SELECTION_DB ]; then @@ -62,6 +63,13 @@ fi #TAGSTATS="valgrind --leak-check=full --show-reachable=yes $TAGSTATS" $TAGSTATS $OPEN_SELECTION_DB --min-tag-combination-count=$min_tag_combination_count --left=$left --bottom=$bottom --top=$top --right=$right --width=$width --height=$height $PLANETFILE $DATABASE +if [ -e $BINDIR/similarity ]; then + echo "`$DATECMD` Running similarity... " + $BINDIR/similarity $DATABASE +else + echo "WARNING: Not running 'similarity', because binary not found. Please compile it." +fi + echo "`$DATECMD` Running update_characters... " ./update_characters.rb $DIR diff --git a/taginfo-config-example.json b/taginfo-config-example.json index 2c225b2..f6661a0 100644 --- a/taginfo-config-example.json +++ b/taginfo-config-example.json @@ -76,6 +76,8 @@ // These sources will be created from the actual sources. "create": "db", "db": { + // Path to binaries (like 'tagstats' and 'similarity'). Will replace 'tagstats' setting. + "bindir": "../../tagstats", // Path to the 'tagstats' program (absolute path or relative to sources/db directory). "tagstats": "../../tagstats/tagstats", // The OSM planet file or extract where we read the OSM data from. |