aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/test-run.sh
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-13 22:18:33 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-13 22:18:33 +0100
commitf22ae908a044ff2a89afff2b62b40fad749d6cd3 (patch)
tree5b526357b52c6640169356edb8be29433ee4c870 /.travis/test-run.sh
parent6d78df962b3aeedb09f51f43fd90116fceec1e2d (diff)
downloadblogc-f22ae908a044ff2a89afff2b62b40fad749d6cd3.tar.gz
blogc-f22ae908a044ff2a89afff2b62b40fad749d6cd3.tar.bz2
blogc-f22ae908a044ff2a89afff2b62b40fad749d6cd3.zip
travis: use realpath
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