ensl.org/script/env.sh
Ari Timonen 3d75804b62 Add a working version with new server setup
Add nginx configs, env.sh update docker-compose
2020-11-05 03:19:28 +01:00

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