From: Vadim Zeitlin Date: Thu, 1 Nov 2012 17:14:54 +0000 (+0000) Subject: Deal correctly with wx directory being a symlink in docs generation script. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ff39e2f2b21442cadb2775d484c310663e548a22 Deal correctly with wx directory being a symlink in docs generation script. The script calling Doxygen is smart enough to strip the path of the wxWidgets directory from the paths of the files, but it didn't do it correctly if this directory was a symlink. Fix this by using readlink, if available, to get the canonical name. Closes #14796. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/doxygen/regen.sh b/docs/doxygen/regen.sh index 64daea529b..5e2757a57a 100755 --- a/docs/doxygen/regen.sh +++ b/docs/doxygen/regen.sh @@ -20,11 +20,19 @@ me=$(basename $0) path=${0%%/$me} # path from which the script has been launched current=$(pwd) cd $path -if [ "$WXWIDGETS" = "" ]; then - export WXWIDGETS=`cd ../.. && pwd` +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 if [ "$OSTYPE" = "cygwin" ]; then - export WXWIDGETS=`cygpath -w $WXWIDGETS` + WXWIDGETS=`cygpath -w $WXWIDGETS` fi + export WXWIDGETS fi if [ "$DOXYGEN" = "" ]; then