Fix path resolution when app dir has been renamed.

This solves path resolution when the default app dir has bee
renamed, and a relative path is used to run `cake`

Fixes #3474
This commit is contained in:
mark_story 2012-12-18 20:31:57 -05:00
parent 6af78c15df
commit fe2f56e8bd

View file

@ -21,6 +21,10 @@
# Canonicalize by following every symlink of the given name recursively
canonicalize() {
NAME=$1
if [ -f "$NAME" ]
then
NAME=$(cd -P -- "$(dirname -- "$NAME")" && pwd -P)/$(basename -- "$NAME")
fi
while [ -h "$NAME" ]; do
DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME")