(Mostly) Fixed tGetParentPath.
This commit is contained in:
parent
c3050750ea
commit
3e285e4737
1 changed files with 10 additions and 2 deletions
12
towel.sh
12
towel.sh
|
@ -35,6 +35,12 @@ tPURPLE=5
|
||||||
tCYAN=6
|
tCYAN=6
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Global variables used by Towel.
|
||||||
|
#
|
||||||
|
__tG__PARENTPATH="${BASH_SOURCE[0]}"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Draws bold white text inside a colored box.
|
# Draws bold white text inside a colored box.
|
||||||
#
|
#
|
||||||
|
@ -231,8 +237,10 @@ function tGetParentPath() {
|
||||||
local __RESULT=$1
|
local __RESULT=$1
|
||||||
local __PARENTPATH=
|
local __PARENTPATH=
|
||||||
|
|
||||||
tFindPath __PARENTPATH "${BASH_SOURCE[1]}"
|
# We have to initialize __tG__PARENTPATH before the calling script
|
||||||
__TOWELPATH="${__PARENTPATH}/`basename \"${BASH_SOURCE[1]}\"`"
|
# changes directories elsewhere. We set it on load.
|
||||||
|
tFindPath __PARENTPATH "${__tG__PARENTPATH}"
|
||||||
|
__TOWELPATH="${__PARENTPATH}/`basename \"${__tG__PARENTPATH}\"`"
|
||||||
|
|
||||||
eval $__RESULT=\${__PARENTPATH}
|
eval $__RESULT=\${__PARENTPATH}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue