Fix source file, BASH_SROUCE did not work without the shebang. Also fix bug for when it sees ..
and assumes current directory.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Provide any necessary project variables.
|
||||
# Needs run in the current shell environment, such as:
|
||||
# source /PATH_TO_GIT_PROJECT/source.env
|
||||
# source /PATH_TO_PROJECT/source.env
|
||||
|
||||
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
if [[ $DIR == \.* ]]; then
|
||||
if [[ "$DIR" == '.'* ]]; then
|
||||
cd $DIR
|
||||
DIR="`pwd`"
|
||||
fi
|
||||
|
||||
@@ -12,3 +14,5 @@ DOCKER_PATH="$DOCKER_HOME/bin"
|
||||
PATH="$DOCKER_PATH:$PATH"
|
||||
|
||||
export DOCKER_HOME DOCKER_PATH PATH
|
||||
|
||||
source $DIR/dns.env
|
||||
|
Reference in New Issue
Block a user