Detect sourcing
This commit is contained in:
parent
1aa8cd7af6
commit
2b215a8a7b
@ -4,7 +4,11 @@ case $- in
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
__SCRIPT=$( pwd )/$BASH_SOURCE
|
||||
__SCRIPT=$BASH_SOURCE
|
||||
echo $BASH_SOURCE | grep -q "^$( pwd )"
|
||||
if [ $? -ne 0 ]; then
|
||||
__SCRIPT=$( pwd )/$BASH_SOURCE
|
||||
fi
|
||||
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user