Closed zjj closed 5 years ago
not sure if readlink is portable if you find a better patch I'll gladly accept, otherwise I will figure this out
@tarzanek
man readlink (on linux..., not test on other platform, but you can find this out on Solaris if there is something simliar)
-f, --canonicalize
canonicalize by following every symlink in every component of
the given name recursively; all but the last component must
exist
pi@raspberrypi /tmp/test $ tree . ├── a -> b └── b -> ../bin/OpenGrok
0 directories, 2 files pi@raspberrypi /tmp/test $ readlink -f a /tmp/bin/OpenGrok pi@raspberrypi /tmp $ readlink -f /tmp/bin/OpenGrok /tmp/bin/OpenGrok
We no longer use OpenGrok shell script.
line 99 of OpenGrok shell script opengrokbin=$(readlink -f ${0}) SCRIPT_DIRECTORY="
dirname ${opengrokbin}
" SCRIPT_DIRECTORY="cd ${SCRIPT_DIRECTORY}; pwd
"A small apporch to that