mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 12:30:48 +00:00
30b9198b6d
Tune env vars Fix logs in gitignore Rename DEPLOY_PATH env var
19 lines
265 B
Bash
Executable file
19 lines
265 B
Bash
Executable file
#!/bin/bash
|
|
# use source script/env.sh
|
|
|
|
args=("$@")
|
|
|
|
if [[ $# -eq 1 ]]; then
|
|
args+=(.env)
|
|
fi
|
|
|
|
for FILE in "$@"
|
|
do
|
|
echo "Loading env vars from: $FILE"
|
|
ARGS=$(cat $FILE |grep -vE '^[[:space:]]*(#.*)*$')
|
|
|
|
export $(echo $ARGS|xargs)
|
|
echo "$ARGS"
|
|
echo
|
|
done
|
|
|