From 12e8e3d3947065f5c6517ca67d96f8b83bdbd543 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Tue, 22 Jan 2013 22:19:26 +0100 Subject: Use ruby instead of perl in master update script --- sources/master/update.sh | 22 ++++++++++++++-------- sources/update_all.sh | 3 ++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/sources/master/update.sh b/sources/master/update.sh index 99d16b0..e90571d 100755 --- a/sources/master/update.sh +++ b/sources/master/update.sh @@ -16,21 +16,27 @@ if [ "x" = "x$DIR" ]; then exit 1 fi -echo "`$DATECMD` Create search database..." - -rm -f $DIR/taginfo-search.db -perl -pe "s|__DIR__|$DIR|" search.sql | sqlite3 $DIR/taginfo-search.db - echo "`$DATECMD` Start master..." +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-master.db +echo "`$DATECMD` Create search database..." + +rm -f $DIR/taginfo-search.db +$EXEC_RUBY -pe "\$_.sub!(/__DIR__/, '$DIR')" search.sql | sqlite3 $DIR/taginfo-search.db + rm -f $DATABASE sqlite3 $DATABASE $DIR/download/taginfo-master.db.bz2 +bzip2 -9 -c $DIR/taginfo-search.db >$DIR/download/taginfo-search.db.bz2 echo "Done." echo "=====================================" -- cgit v1.2.3