From: Guus Sliepen Date: Sun, 1 Sep 2013 13:40:59 +0000 (+0200) Subject: Some shells set $_ to an absolute path. X-Git-Tag: release-1.1pre9~19 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=1cdb0c21d42d600d0e89857f4e9f33843f9372c8;p=tinc Some shells set $_ to an absolute path. --- diff --git a/test/testlib.sh b/test/testlib.sh index e65127d6..635bafe3 100644 --- a/test/testlib.sh +++ b/test/testlib.sh @@ -8,9 +8,18 @@ sptps_test=../src/sptps_test # Test directories -d1=$PWD/$_.1 -d2=$PWD/$_.2 -d3=$PWD/$_.3 +case "$_" in + /*) + d1=$_.1 + d2=$_.2 + d3=$_.3 + ;; + *) + d1=$PWD/$_.1 + d2=$PWD/$_.2 + d3=$PWD/$_.3 + ;; +esac # Remove test directories