aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/test-run.sh
diff options
context:
space:
mode:
Diffstat (limited to '.travis/test-run.sh')
-rwxr-xr-x.travis/test-run.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/.travis/test-run.sh b/.travis/test-run.sh
index ff84b50..8858dd8 100755
--- a/.travis/test-run.sh
+++ b/.travis/test-run.sh
@@ -2,7 +2,12 @@
set -e
-SCRIPT_DIR="$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")"
+REALPATH=grealpath
+if ! command -v grealpath >/dev/null 2>&1; then
+ REALPATH=realpath
+fi
+
+SCRIPT_DIR="$(dirname "$("${REALPATH}" "${BASH_SOURCE[0]}")")"
TARGET_SCRIPT="${SCRIPT_DIR}/targets/${TARGET}.sh"
if [[ -n "${TARGET}" ]] && [[ -e "${TARGET_SCRIPT}" ]]; then