From 5b736feefd2dd54e008b518a4269078dc73dd634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Mon, 15 Oct 2018 04:54:18 -0300 Subject: [PATCH] Don't depend on realpath being installed --- pmd-dist/src/main/scripts/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pmd-dist/src/main/scripts/run.sh b/pmd-dist/src/main/scripts/run.sh index dfda65642c..79e4ef609e 100755 --- a/pmd-dist/src/main/scripts/run.sh +++ b/pmd-dist/src/main/scripts/run.sh @@ -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}"