浏览代码

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

teor (Tim Wilson-Brown) 7 年之前
父节点
当前提交
9c6885e94d
共有 1 个文件被更改,包括 6 次插入0 次删除
  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