Don't use "readlink -e" in docs generation script, it's not portable.
"readlink" command also exists under OS X but with a completely different syntax than under Linux, so just use "pwd -P" to get the physical path name instead, this should hopefully work everywhere as it's POSIX. Closes #14796. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,14 +21,11 @@ path=${0%%/$me} # path from which the script has been launched
|
||||
current=$(pwd)
|
||||
cd $path
|
||||
if [[ -z "$WXWIDGETS" ]]; then
|
||||
WXWIDGETS=`cd ../.. && pwd`
|
||||
# Use the real path in case it's a symlink
|
||||
if command -v readlink; then
|
||||
normalized=`readlink -e $WXWIDGETS`
|
||||
if [[ -n $normalized ]]; then
|
||||
WXWIDGETS=$normalized
|
||||
fi
|
||||
fi
|
||||
# Notice the use of -P to ensure we get the canonical path even if there
|
||||
# are symlinks in the current path. This is important because Doxygen
|
||||
# strips this string from the paths in the generated files textually and it
|
||||
# wouldn't work if it contained symlinks.
|
||||
WXWIDGETS=`cd ../.. && pwd -P`
|
||||
if [ "$OSTYPE" = "cygwin" ]; then
|
||||
WXWIDGETS=`cygpath -w $WXWIDGETS`
|
||||
fi
|
||||
|
Reference in New Issue
Block a user