Skip to content

Commit

Permalink
Update comment - taginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Apr 13, 2024
1 parent c685ad9 commit 04bc481
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions images/taginfo/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ DATADOWNLOAD=/osm/planet/var
mkdir -p $DATADIR/
mkdir -p $DATADOWNLOAD/

sed -i 's/"env -/"/g' $WORKDIR/taginfo/sources/util.sh

updates_source_code() {
echo "Update...Procesor source code"
sed -i 's/"env -/"/g' $WORKDIR/taginfo/sources/util.sh
# Function to replace the projects repo to get the projects information
TAGINFO_PROJECT_REPO=${TAGINFO_PROJECT_REPO//\//\\/}
sed -i -e 's/https:\/\/github.com\/taginfo\/taginfo-projects.git/'$TAGINFO_PROJECT_REPO'/g' $WORKDIR/taginfo/sources/projects/update.sh
Expand Down Expand Up @@ -44,15 +43,15 @@ process_data() {
chronology/update.sh $DATADIR
mv $DATADIR/taginfo-*.db $DATADIR/
mv $DATADIR/*/taginfo-*.db $DATADIR/
# if BUCKET_NAME is set upload data
# if BUCKET_NAME is set upload data
if ! aws s3 ls "s3://$BUCKET_NAME/$ENVIRONMENT" 2>&1 | grep -q 'An error occurred'; then
aws s3 sync $DATADIR/ s3://$AWS_S3_BUCKET/$ENVIRONMENT/ --exclude "*" --include "*.db"
fi
}

start_web() {
echo "Start...Taginfo web service"
if BUCKET_NAME is set download data
# if BUCKET_NAME is set download data
if ! aws s3 ls "s3://$BUCKET_NAME/$ENVIRONMENT" 2>&1 | grep -q 'An error occurred'; then
aws s3 sync s3://$AWS_S3_BUCKET/$ENVIRONMENT/ $DATADIR/
fi
Expand All @@ -63,6 +62,6 @@ ACTION=$1
mkdir -p $DATA_DIR/update/log/
if [ "$ACTION" = "web" ]; then
start_web
elif [ "$ACTION" = "data" ]; then
elif [ "$ACTION" = "data" ]; then
process_data
fi

0 comments on commit 04bc481

Please sign in to comment.