Skip to content

Commit b4c7514

Browse files
author
Rub21
committed
Set db to create or download
1 parent e437b38 commit b4c7514

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

images/taginfo/start.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ grep -v '^ *//' $WORKDIR/taginfo/taginfo-config-example.json |
2424
[[ ! -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
2525
[[ ! -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
2626

27+
# Update DBs to create
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+
[[ ! -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
30+
2731
# Function to replace the repo to get the projects information
28-
# TAGINFO_PROJECT_REPO=${TAGINFO_PROJECT_REPO//\//\\/}
29-
# sed -i -e 's/https:\/\/github.com\/taginfo\/taginfo-projects.git/'$TAGINFO_PROJECT_REPO'/g' $WORKDIR/taginfo/sources/projects/update.sh
30-
git clone --quiet --depth=1 $TAGINFO_PROJECT_REPO "$UPDATE_DIR/taginfo-projects"
32+
TAGINFO_PROJECT_REPO=${TAGINFO_PROJECT_REPO//\//\\/}
33+
sed -i -e 's/https:\/\/github.com\/taginfo\/taginfo-projects.git/'$TAGINFO_PROJECT_REPO'/g' $WORKDIR/taginfo/sources/projects/update.sh
3134

3235
# The follow line is requiered to avoid an issue -> require cannot load such file -- sqlite3
3336
sed -i -e 's/run_ruby "$SRCDIR\/update_characters.rb"/ruby "$SRCDIR\/update_characters.rb"/g' $WORKDIR/taginfo/sources/db/update.sh

0 commit comments

Comments
 (0)