]> git.meshlink.io Git - meshlink/commitdiff
Some shells set $_ to an absolute path.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 1 Sep 2013 13:40:59 +0000 (15:40 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 1 Sep 2013 13:40:59 +0000 (15:40 +0200)
test/testlib.sh

index e65127d6acf9bd3b20779ad9a30b98195aedcf50..635bafe332556700c96d4b1719719473064f41d4 100644 (file)
@@ -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