tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 2c75d4a8d0bea2e9c0ebd5ef07b6f9149ce135cb
parent 0418bc0cb276a6c11f6f05332ca15c87b5a5e56d
Author: teor <teor@torproject.org>
Date:   Mon, 20 Jan 2020 13:20:14 +1000

add_c_file: Improve script documentation

Part of 32962.

Diffstat:
Mscripts/maint/add_c_file.py | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/scripts/maint/add_c_file.py b/scripts/maint/add_c_file.py @@ -4,16 +4,20 @@ Add a C file with matching header to the Tor codebase. Creates both files from templates, and adds them to the right include.am file. - This script takes paths relative to the top-level tor directory. - It creates files, and inserts them into include.am, also relative to - the top-level tor directory. + This script takes paths relative to the top-level tor directory. It + expects to be run from that directory. + + This script creates files, and inserts them into include.am, also + relative to the top-level tor directory. But the template content in those files is relative to tor's src directory. (This script strips "src" from the paths used to create templated comments and macros.) This script expects posix paths, so it should be run with a python - where os.path is posixpath. (Rather than ntpath.) + where os.path is posixpath. (Rather than ntpath.) This probably means + Linux, macOS, or BSD, although it might work on Windows if your python + was compiled with mingw, MSYS, or cygwin. Example usage: