[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] add_c_file: Improve tor source directory checks



commit 0418bc0cb276a6c11f6f05332ca15c87b5a5e56d
Author: teor <teor@xxxxxxxxxxxxxx>
Date:   Mon Jan 20 13:04:02 2020 +1000

    add_c_file: Improve tor source directory checks
    
    Check that the script isn't in a tor build directory, by looking
    for a src/include.am file.
    
    Part of 32962.
---
 scripts/maint/add_c_file.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py
index 25a1be533..a7478cbec 100755
--- a/scripts/maint/add_c_file.py
+++ b/scripts/maint/add_c_file.py
@@ -265,6 +265,8 @@ def run(fname):
     # Make sure we're in the top-level tor directory,
     # which contains the src directory
     assert(os.path.isdir("src"))
+    # And it looks like a tor/src directory
+    assert(os.path.isfile("src/include.am"))
 
     # Make the file name relative to the top-level tor directory
     tor_fname = tordir_file(fname)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits