Tidy
This commit is contained in:
@ -27,7 +27,7 @@ load_env() {
|
||||
source "$script_dir/_basic.env"
|
||||
set +a
|
||||
else
|
||||
echo "Warning: basic.env file not found at $script_dir/_basic.env. Broken template?"
|
||||
echo "Warning: _basic.env file not found at $script_dir/_basic.env. Broken template?"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -35,23 +35,18 @@ load_env() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 [path_to_env_file]"
|
||||
return 1
|
||||
else
|
||||
# If path is relative, make it absolute using script directory as base
|
||||
if [[ "$1" != /* ]]; then
|
||||
env_file="$script_dir/$1"
|
||||
else
|
||||
env_file="$1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$env_file" ]; then
|
||||
set -a
|
||||
source "$env_file"
|
||||
set +a
|
||||
else
|
||||
echo "Warning: .env file not found at $env_file"
|
||||
|
||||
env_file="$1/service.env"
|
||||
|
||||
if [ ! -f "$env_file" ]; then
|
||||
echo "Warning: service.env file not found in $1"
|
||||
return 1
|
||||
fi
|
||||
|
||||
set -a
|
||||
source "$env_file"
|
||||
set +a
|
||||
}
|
||||
|
||||
grey_start() {
|
||||
|
Reference in New Issue
Block a user