Don't depend on realpath being installed

This commit is contained in:
Juan Martín Sotuyo Dodero
2018-10-15 04:54:18 -03:00
parent 1cbae7f1e9
commit 5b736feefd

View File

@ -62,7 +62,11 @@ java_heapsize_settings() {
set_lib_dir() {
if [ -z ${LIB_DIR} ]; then
# Allow for symlinks to this script
local script_real_loc=$(realpath "$0")
if [ -L $0 ]; then
local script_real_loc=$(readlink "$0")
else
local script_real_loc=$0
fi
local script_dir=$(dirname "${script_real_loc}")
local cwd="${PWD}"