From c40219691a07f30c388edccad1e67a47a367250b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 5 Jul 2023 18:43:48 -0700 Subject: [PATCH] Show a warning if not using the currently preferred location. --- source.env | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source.env b/source.env index 943f711..4d6e7c1 100644 --- a/source.env +++ b/source.env @@ -1,11 +1,18 @@ #!/bin/bash -# Converted the env file to a shell script so that $0 can be used. +# 2023-07-05 Converted the env file to a shell script so that $0 can be used. DIR=`dirname $0` if [[ $DIR == \.* ]]; then DIR=`pwd` fi +# Some projects are hard-coded to use /opt/Docker/Volumes so display a notice +# until they are updated to be directory agnostic. Will help with testing! +PREFERRED_HOME="/opt/Docker" +if [[ $DIR != $PREFERRED_HOME ]]; then + echo "WARNING: Preferred home is $PREFERRED_HOME but using $DIR." >&2 +fi + DOCKER_HOME=$DIR DOCKER_PATH=$DOCKER_HOME/bin PATH=$DOCKER_PATH:$PATH