diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-13 22:18:33 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-03-13 22:18:33 +0100 |
commit | f22ae908a044ff2a89afff2b62b40fad749d6cd3 (patch) | |
tree | 5b526357b52c6640169356edb8be29433ee4c870 /.travis/test-run.sh | |
parent | 6d78df962b3aeedb09f51f43fd90116fceec1e2d (diff) | |
download | blogc-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.sh | 7 |
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 |