make profile path configurable as autodetection is too unprecise so far
This commit is contained in:
@@ -80,7 +80,11 @@ pathappend ()
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Store script's path (realpath -s resolve symlinks if profile.sh is a symlink)
|
||||
if [[ -z $PROFILE_PATH ]]; then
|
||||
export MYPATH=$(dirname $(realpath -s $0))
|
||||
else
|
||||
export MYPATH=$PROFILE_PATH
|
||||
fi
|
||||
if [[ ! -e $MYPATH/profile.sh ]]; then
|
||||
echo "[ Warning ] Path detection failed, using pwd..."
|
||||
MYPATH=$(pwd)
|
||||
|
||||
Reference in New Issue
Block a user