#!/bin/bash # Provide any necessary project variables. # Needs run in the current shell environment, such as: # source /PATH_TO_PROJECT/source.env DIR="$(dirname -- "${BASH_SOURCE[0]}")" PROG="$(basename -- "${BASH_SOURCE[0]}")" # Get the absolute path. CURR="`pwd`" cd $DIR DIR="`pwd`" cd "$CURR" ## Variables ## DOCKER_HOME="$DIR" DOCKER_PATH="$DOCKER_HOME/bin" PATH="$DOCKER_PATH:$PATH" export DOCKER_HOME DOCKER_PATH PATH ## Aliases ## alias manage="$DOCKER_HOME/bin/manage.sh" alias Docker="cd $DOCKER_HOME" alias Config="cd $DOCKER_HOME/Config" alias Volumes="cd $DOCKER_HOME/Volumes" ## Validations ## if [[ -e $DOCKER_HOME/$PROG ]]; then echo "'$DOCKER_HOME/$PROG' has been loaded successfully." else echo "ERROR: Something has gone wrong, could not find '$PROG' from absolute " echo "path, Docker Home '$DOCKER_HOME' is likely wrong." exit 1 fi