aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2020-01-20 13:04:02 +1000
committerteor <teor@torproject.org>2020-01-20 13:04:02 +1000
commit0418bc0cb276a6c11f6f05332ca15c87b5a5e56d (patch)
tree04aaf076ab691a6db6cd04930f966afe2e050642 /scripts
parenteb336e23a6a0979cf0c8e68f3dcd6a825a4b210d (diff)
downloadtor-0418bc0cb276a6c11f6f05332ca15c87b5a5e56d.tar.gz
tor-0418bc0cb276a6c11f6f05332ca15c87b5a5e56d.zip
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/add_c_file.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py
index 25a1be5331..a7478cbecf 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)