diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-04 21:35:33 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-04 21:35:33 +0800 |
| commit | 08cce61ac9e4b7ebb557b68d57097bd7eab930f3 (patch) | |
| tree | 0e97c24a9ed539fd10ffd0c5ba5af2eb179f2486 /tools/migrate-1/migrate-cmake.py | |
| parent | 327f54b605b92a7b81a5a4de95f9f3741b786be5 (diff) | |
| download | cru-08cce61ac9e4b7ebb557b68d57097bd7eab930f3.tar.gz cru-08cce61ac9e4b7ebb557b68d57097bd7eab930f3.tar.bz2 cru-08cce61ac9e4b7ebb557b68d57097bd7eab930f3.zip | |
Remove unused tools.
Diffstat (limited to 'tools/migrate-1/migrate-cmake.py')
| -rw-r--r-- | tools/migrate-1/migrate-cmake.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tools/migrate-1/migrate-cmake.py b/tools/migrate-1/migrate-cmake.py deleted file mode 100644 index b90bd2e9..00000000 --- a/tools/migrate-1/migrate-cmake.py +++ /dev/null @@ -1,26 +0,0 @@ -import re -from pathlib import Path - -regex = re.compile(r'\s*(.*\/)*(.*)(\.[hc]pp)$') - -def xstr(s): - if s is None: - return '' - return str(s) - -for p in Path('./src').rglob('CMakeLists.txt'): - text = '' - with p.open(mode='r', encoding='utf-8') as f: - for line in f.readlines(): - m = regex.match(line) - if m: - t = m.group(2) - t = ''.join(([i.capitalize() for i in t.split('_')])) - t = '\t{}{}{}\n'.format(xstr(m.group(1)), t, m.group(3)) - text += t - else: - text += line - with p.open(mode='w', encoding='utf-8') as f: - f.write(text) - - |
