diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-22 21:59:34 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-22 21:59:34 +0100 |
commit | cf2345f0b143f6164f6bf35ac168d64a52db1951 (patch) | |
tree | bf1e2ffbee03fce405e0c3b1c3fa7d7c2c7d5283 | |
parent | fedae9468d974361783d6bd67fb05b353ac6c159 (diff) | |
download | taginfo-cf2345f0b143f6164f6bf35ac168d64a52db1951.tar taginfo-cf2345f0b143f6164f6bf35ac168d64a52db1951.tar.gz |
Allow overriding of ruby version in update scripts
-rwxr-xr-x | sources/josm/update.sh | 8 | ||||
-rwxr-xr-x | sources/languages/update.sh | 10 | ||||
-rwxr-xr-x | sources/merkaartor/update.sh | 8 | ||||
-rwxr-xr-x | sources/potlatch/update.sh | 8 | ||||
-rwxr-xr-x | sources/wiki/update.sh | 14 |
5 files changed, 39 insertions, 9 deletions
diff --git a/sources/josm/update.sh b/sources/josm/update.sh index a52a8e8..42f34a3 100755 --- a/sources/josm/update.sh +++ b/sources/josm/update.sh @@ -18,6 +18,12 @@ fi echo "`$DATECMD` Start josm..." +EXEC_RUBY="$TAGINFO_RUBY" +if [ "x$EXEC_RUBY" = "x" ]; then + EXEC_RUBY=ruby +fi +echo "Running with ruby set as '${EXEC_RUBY}'" + DATABASE=$DIR/taginfo-josm.db ELEMSTYLES=$DIR/elemstyles.xml @@ -43,7 +49,7 @@ echo "`$DATECMD` Running pre.sql..." sqlite3 $DATABASE <pre.sql echo "`$DATECMD` Running import..." -./import_josm.rb $DIR +$EXEC_RUBY ./import_josm.rb $DIR echo "`$DATECMD` Running post.sql..." sqlite3 $DATABASE <post.sql diff --git a/sources/languages/update.sh b/sources/languages/update.sh index 4441b88..e963d34 100755 --- a/sources/languages/update.sh +++ b/sources/languages/update.sh @@ -27,6 +27,12 @@ fi echo "`$DATECMD` Start languages..." +EXEC_RUBY="$TAGINFO_RUBY" +if [ "x$EXEC_RUBY" = "x" ]; then + EXEC_RUBY=ruby +fi +echo "Running with ruby set as '${EXEC_RUBY}'" + DATABASE=$DIR/taginfo-languages.db rm -f $DATABASE @@ -41,7 +47,7 @@ echo "`$DATECMD` Getting subtag registry..." curl --silent --time-cond $REGISTRY_FILE --output $REGISTRY_FILE $REGISTRY_URL echo "`$DATECMD` Running subtag import..." -./import_subtag_registry.rb $DIR +$EXEC_RUBY ./import_subtag_registry.rb $DIR echo "`$DATECMD` Getting CLDR..." curl --silent --location --time-cond $CLDR_FILE --output $CLDR_FILE $CLDR_URL @@ -56,7 +62,7 @@ curl --silent --location --time-cond $UNICODE_SCRIPTS_FILE --output $UNICODE_SCR curl --silent --location --time-cond $PROPERTY_ALIASES_FILE --output $PROPERTY_ALIASES_FILE $PROPERTY_ALIASES_URL echo "`$DATECMD` Running unicode scripts import..." -./import_unicode_scripts.rb $DIR +$EXEC_RUBY ./import_unicode_scripts.rb $DIR echo "`$DATECMD` Running post.sql..." sqlite3 $DATABASE <post.sql diff --git a/sources/merkaartor/update.sh b/sources/merkaartor/update.sh index a112b27..8d68de7 100755 --- a/sources/merkaartor/update.sh +++ b/sources/merkaartor/update.sh @@ -18,6 +18,12 @@ fi echo "`$DATECMD` Start merkaartor..." +EXEC_RUBY="$TAGINFO_RUBY" +if [ "x$EXEC_RUBY" = "x" ]; then + EXEC_RUBY=ruby +fi +echo "Running with ruby set as '${EXEC_RUBY}'" + DATABASE=$DIR/taginfo-merkaartor.db rm -f $DATABASE @@ -38,7 +44,7 @@ echo "`$DATECMD` Running pre.sql..." sqlite3 $DATABASE <pre.sql echo "`$DATECMD` Running import..." -./import_merkaartor.rb $DIR +$EXEC_RUBY ./import_merkaartor.rb $DIR echo "`$DATECMD` Running post.sql..." sqlite3 $DATABASE <post.sql diff --git a/sources/potlatch/update.sh b/sources/potlatch/update.sh index a2ebcf7..35e1776 100755 --- a/sources/potlatch/update.sh +++ b/sources/potlatch/update.sh @@ -18,6 +18,12 @@ fi echo "`$DATECMD` Start potlatch..." +EXEC_RUBY="$TAGINFO_RUBY" +if [ "x$EXEC_RUBY" = "x" ]; then + EXEC_RUBY=ruby +fi +echo "Running with ruby set as '${EXEC_RUBY}'" + DATABASE=$DIR/taginfo-potlatch.db rm -f $DATABASE @@ -38,7 +44,7 @@ echo "`$DATECMD` Running pre.sql..." sqlite3 $DATABASE <pre.sql echo "`$DATECMD` Running import..." -./import_potlatch.rb $DIR +$EXEC_RUBY ./import_potlatch.rb $DIR echo "`$DATECMD` Running post.sql..." sqlite3 $DATABASE <post.sql diff --git a/sources/wiki/update.sh b/sources/wiki/update.sh index 308c1b4..e922710 100755 --- a/sources/wiki/update.sh +++ b/sources/wiki/update.sh @@ -18,6 +18,12 @@ fi echo "`$DATECMD` Start wiki..." +EXEC_RUBY="$TAGINFO_RUBY" +if [ "x$EXEC_RUBY" = "x" ]; then + EXEC_RUBY=ruby +fi +echo "Running with ruby set as '${EXEC_RUBY}'" + DATABASE=$DIR/taginfo-wiki.db CACHEDB=$DIR/wikicache.db LOGFILE_WIKI_DATA=$DIR/get_wiki_data.log @@ -39,16 +45,16 @@ echo "`$DATECMD` Running pre.sql..." sqlite3 $DATABASE <pre.sql echo "`$DATECMD` Getting page list..." -./get_page_list.rb $DIR +$EXEC_RUBY ./get_page_list.rb $DIR echo "`$DATECMD` Getting wiki data..." -./get_wiki_data.rb $DIR >$LOGFILE_WIKI_DATA +$EXEC_RUBY ./get_wiki_data.rb $DIR >$LOGFILE_WIKI_DATA echo "`$DATECMD` Getting image info..." -./get_image_info.rb $DIR >$LOGFILE_IMAGE_INFO +$EXEC_RUBY ./get_image_info.rb $DIR >$LOGFILE_IMAGE_INFO echo "`$DATECMD` Extracting words..." -./extract_words.rb $DIR +$EXEC_RUBY ./extract_words.rb $DIR echo "`$DATECMD` Running post.sql..." sqlite3 $DATABASE <post.sql |