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)
|
# Store script's path (realpath -s resolve symlinks if profile.sh is a symlink)
|
||||||
export MYPATH=$(dirname $(realpath -s $0))
|
if [[ -z $PROFILE_PATH ]]; then
|
||||||
|
export MYPATH=$(dirname $(realpath -s $0))
|
||||||
|
else
|
||||||
|
export MYPATH=$PROFILE_PATH
|
||||||
|
fi
|
||||||
if [[ ! -e $MYPATH/profile.sh ]]; then
|
if [[ ! -e $MYPATH/profile.sh ]]; then
|
||||||
echo "[ Warning ] Path detection failed, using pwd..."
|
echo "[ Warning ] Path detection failed, using pwd..."
|
||||||
MYPATH=$(pwd)
|
MYPATH=$(pwd)
|
||||||
|
|||||||
Reference in New Issue
Block a user