File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ INSTANCE_DESCRIPTION="This is a <b>taginfo test instance</b>. Change this text i
8
8
INSTANCE_ICON=/img/logo/world.png
9
9
INSTANCE_CONTACT=Anonymous
10
10
TAGINFO_PROJECT_REPO=https://github.com/taginfo/taginfo-projects.git
11
+ DOWNLOAD_DB=languages wiki
12
+ CREATE_DB=db projects chronology
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- # set -x
3
2
4
3
WORKDIR=/apps
5
4
DATA_DIR=$WORKDIR /data
@@ -24,6 +23,7 @@ grep -v '^ *//' $WORKDIR/taginfo/taginfo-config-example.json |
24
23
[[ ! -z $INSTANCE_ICON +z} ]] && jq --arg a " ${INSTANCE_ICON} " ' .instance.icon = $a' $WORKDIR /taginfo-config.json > tmp.json && mv tmp.json $WORKDIR /taginfo-config.json
25
24
[[ ! -z $INSTANCE_CONTACT +z} ]] && jq --arg a " ${INSTANCE_CONTACT} " ' .instance.contact = $a' $WORKDIR /taginfo-config.json > tmp.json && mv tmp.json $WORKDIR /taginfo-config.json
26
25
26
+
27
27
# Update DBs to create
28
28
[[ ! -z $DOWNLOAD_DB +z} ]] && jq --arg a " ${DOWNLOAD_DB} " ' .sources.download = $a' $WORKDIR /taginfo-config.json > tmp.json && mv tmp.json $WORKDIR /taginfo-config.json
29
29
[[ ! -z $CREATE_DB +z} ]] && jq --arg a " ${CREATE_DB} " ' .sources.create = $a' $WORKDIR /taginfo-config.json > tmp.json && mv tmp.json $WORKDIR /taginfo-config.json
@@ -34,6 +34,9 @@ sed -i -e 's/https:\/\/github.com\/taginfo\/taginfo-projects.git/'$TAGINFO_PROJE
34
34
35
35
# The follow line is requiered to avoid an issue -> require cannot load such file -- sqlite3
36
36
sed -i -e ' s/run_ruby "$SRCDIR\/update_characters.rb"/ruby "$SRCDIR\/update_characters.rb"/g' $WORKDIR /taginfo/sources/db/update.sh
37
+ sed -i -e ' s/run_ruby "$SRCDIR\/import.rb"/ruby "$SRCDIR\/import.rb"/g' $WORKDIR /taginfo/sources/projects/update.sh
38
+ sed -i -e ' s/run_ruby "$SRCDIR\/parse.rb"/ruby "$SRCDIR\/parse.rb"/g' $WORKDIR /taginfo/sources/projects/update.sh
39
+ sed -i -e ' s/run_ruby "$SRCDIR\/get_icons.rb"/ruby "$SRCDIR\/get_icons.rb"/g' $WORKDIR /taginfo/sources/projects/update.sh
37
40
38
41
update () {
39
42
echo " Download and update pbf files at $( date +%Y-%m-%d:%H-%M) "
@@ -82,6 +85,8 @@ main() {
82
85
# Check if db files are store in the $DATA_DIR
83
86
NUM_DB_FILES=$( ls $DATA_DIR /* .db | wc -l)
84
87
if [ $NUM_DB_FILES -lt 7 ]; then
88
+ # We are changing the default values, we need to run update twice at the beginning
89
+ update
85
90
update
86
91
fi
87
92
start_web &
You can’t perform that action at this time.
0 commit comments