Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
hu8813 committed Apr 2, 2024
1 parent 6591e47 commit 1401c3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
up:
@if [ ! -f ".env" ] || [ ! -f "backend/.env" ]; then \
./check_env.sh; \
./src/check_env.sh; \
fi
@open https://localhost:8443/ || true
@open https://localhost:3000/ || true
Expand Down
6 changes: 3 additions & 3 deletions src/check_env.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

env_file="../.env"
env_file=".env"

touch "$env_file" ../backend/.env
touch "$env_file" backend/.env

read_var_from_env_file() {
local var_name=$1
Expand Down Expand Up @@ -67,6 +67,6 @@ set_default_variable POSTGRES_PORT "5432"
pgpassword_value=$(read_var_from_env_file PGPASSWORD)
set_default_variable POSTGRES_PASSWORD "$pgpassword_value"

cp $env_file ../backend/.env
cp $env_file backend/.env
echo "Environment variables have been updated in $env_file."

0 comments on commit 1401c3b

Please sign in to comment.