From 974a3655ee95fd22f98262603dca4faf8ed0711f Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Date: Mon, 24 Aug 2015 13:47:58 +0200 Subject: t: use __g_realpath instead of realpath --- t/tests.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 't/tests.sh') diff --git a/t/tests.sh b/t/tests.sh index a0d32e2..2eb0e00 100644 --- a/t/tests.sh +++ b/t/tests.sh @@ -15,8 +15,14 @@ set -e +# From g.sh +__g_realpath() { + [ -d "$1" ] && echo "$(cd "$1" && pwd)" || echo "$(cd "$(dirname "$1")" + && pwd)/$(basename "$1")" +} + # Cleanup previous tests and setup some special variables. -d="$(realpath $(dirname $0))" +d="$(__g_realpath $(dirname $0))" rm -f $d/output.txt HOME="$d" -- cgit v1.2.3