Commit 3e285e47 authored by Scott Duensing's avatar Scott Duensing

(Mostly) Fixed tGetParentPath.

parent c3050750
......@@ -35,6 +35,12 @@ tPURPLE=5
tCYAN=6
#
# Global variables used by Towel.
#
__tG__PARENTPATH="${BASH_SOURCE[0]}"
#
# Draws bold white text inside a colored box.
#
......@@ -231,8 +237,10 @@ function tGetParentPath() {
local __RESULT=$1
local __PARENTPATH=
tFindPath __PARENTPATH "${BASH_SOURCE[1]}"
__TOWELPATH="${__PARENTPATH}/`basename \"${BASH_SOURCE[1]}\"`"
# We have to initialize __tG__PARENTPATH before the calling script
# changes directories elsewhere. We set it on load.
tFindPath __PARENTPATH "${__tG__PARENTPATH}"
__TOWELPATH="${__PARENTPATH}/`basename \"${__tG__PARENTPATH}\"`"
eval $__RESULT=\${__PARENTPATH}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment