Skip to content

Commit 26b4695

Browse files
author
Rub21
committed
Update values and replace
1 parent b4c7514 commit 26b4695

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.env-taginfo.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ INSTANCE_DESCRIPTION="This is a <b>taginfo test instance</b>. Change this text i
88
INSTANCE_ICON=/img/logo/world.png
99
INSTANCE_CONTACT=Anonymous
1010
TAGINFO_PROJECT_REPO=https://github.com/taginfo/taginfo-projects.git
11+
DOWNLOAD_DB=languages wiki
12+
CREATE_DB=db projects chronology

images/taginfo/start.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env bash
2-
# set -x
32

43
WORKDIR=/apps
54
DATA_DIR=$WORKDIR/data
@@ -24,6 +23,7 @@ grep -v '^ *//' $WORKDIR/taginfo/taginfo-config-example.json |
2423
[[ ! -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
2524
[[ ! -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
2625

26+
2727
# Update DBs to create
2828
[[ ! -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
2929
[[ ! -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
3434

3535
# The follow line is requiered to avoid an issue -> require cannot load such file -- sqlite3
3636
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
3740

3841
update() {
3942
echo "Download and update pbf files at $(date +%Y-%m-%d:%H-%M)"
@@ -82,6 +85,8 @@ main() {
8285
# Check if db files are store in the $DATA_DIR
8386
NUM_DB_FILES=$(ls $DATA_DIR/*.db | wc -l)
8487
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
8590
update
8691
fi
8792
start_web &

0 commit comments

Comments
 (0)