Browse Source

Find TOR_DIR if it's called tor and next to chutney

teor (Tim Wilson-Brown) 7 years ago
parent
commit
9c6885e94d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tools/test-network.sh

+ 6 - 0
tools/test-network.sh

@@ -92,6 +92,12 @@ if [ ! -d "$TOR_DIR" ]; then
         # But only if it looks like one
         echo "$myname: \$TOR_DIR not set, trying \$PWD"
         export TOR_DIR="$PWD"
+    elif [ -d "$PWD/../tor" -a -d "$PWD/../tor/src/or" -a \
+	   -d "$PWD/../tor/src/tools" ]; then
+        # Guess the tor directory is next to the current directory
+        # But only if it looks like one
+        echo "$myname: \$TOR_DIR not set, trying \$PWD/../tor"
+        export TOR_DIR="$PWD/../tor"
     else
         echo "$myname: no \$TOR_DIR, chutney will use \$PATH for tor binaries"
         unset TOR_DIR