diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 45dc49f..2097e7e 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -6,20 +6,26 @@ set -e #ux cwd="$(pwd)" ## Change to project directory cd "$(dirname "$0")/.." -# shellcheck source="../.env" -source .env +if [ -f .env ]; then + # shellcheck source="../.env" disable=SC1091 + source .env +fi ./scripts/python_setup.sh "$@" echo "-- Shell: Source profile in case it's been updated" -# shellcheck source="$HOME/.profile" +# shellcheck source="$HOME/.profile" disable=SC1091 source "$HOME/.profile" + echo "-- Activate Python virtual environment" # shellcheck source="../.venv/bin/activate" source .venv/bin/activate -echo "-- Source '.env' configuration file" -# shellcheck source="../.env" -source .env + +if [ -f .env ]; then + echo "-- Source '.env' configuration file" + # shellcheck source="../.env" disable=SC1091 + source .env +fi ## and go back cd "$cwd"