From b75ca07e8e2abaf4448cbf91cfff2ca3e7df44ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Mon, 15 Oct 2018 04:14:21 -0300 Subject: [PATCH] Allow symlinking the run script --- pmd-dist/src/main/scripts/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmd-dist/src/main/scripts/run.sh b/pmd-dist/src/main/scripts/run.sh index 9a5ce0d3e0..dfda65642c 100755 --- a/pmd-dist/src/main/scripts/run.sh +++ b/pmd-dist/src/main/scripts/run.sh @@ -61,7 +61,9 @@ java_heapsize_settings() { set_lib_dir() { if [ -z ${LIB_DIR} ]; then - local script_dir=$(dirname "${0}") + # Allow for symlinks to this script + local script_real_loc=$(realpath "$0") + local script_dir=$(dirname "${script_real_loc}") local cwd="${PWD}" cd "${script_dir}/../lib"