Skip to content

Commit

Permalink
debug entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nandajavarma committed Aug 2, 2024
1 parent 6819685 commit 9b84d0d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deployment/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
#!/bin/bash
# entrypoint.sh

# Enable debugging
set -x

# Extract the languages from the environment variable
echo "PEARS_LANGS: ${PEARS_LANGS}"
IFS=',' read -ra LANGS <<< "${PEARS_LANGS}"

# Loop through each language and install it unless it's 'eng'
for lang in "${LANGS[@]}"; do
echo "Processing language: $lang"
if [ "$lang" != "en" ]; then
echo "Installing language: $lang"
flask pears install-language "$lang"
if [ $? -ne 0 ]; then
echo "Error installing language: $lang"
exit 1
fi
fi
done

Expand Down

0 comments on commit 9b84d0d

Please sign in to comment.