Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
EOASkripts/scripts/config/load_env.fish
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
26 lines (20 sloc)
700 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/fish | |
if not set -q SCRIPT_DIR | |
echo "ERROR in (status -m): \$SCRIPT_DIR is undefined!" | |
exit 1 | |
end | |
set BASE_DIR "$SCRIPT_DIR/.." | |
####################################### | |
# actual script | |
####################################### | |
set RUNTIME_DIR "runtime_data" | |
################################################### | |
# export all these variables, so | |
# they can be referenced in the docker-compose.yaml | |
################################################### | |
# convert bash syntax to fish syntax: | |
set commands (cat ./scripts/config/env.conf | grep -E --invert-match '^#|^[[:space:]]*$' | sed 's/^\(.*\)=\(.*\)/set -x \1 \2/' | sed 's/\$(/(/g') | |
for cmd in $commands | |
echo "cmd: $cmd" | |
eval "$cmd" | |
end |