ff4ff35918
Red Bear OS is a full fork. All sources must be available from git clone with zero network access. Removed gitignore rules that excluded fetched source trees under recipes/*/source/, local/recipes/kde/*/source/, local/recipes/qt/*/source/, and vendor source trees. Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded. 127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt frameworks, mesa, wayland, DRM drivers, and every other recipe source.
28 lines
825 B
Python
Executable File
28 lines
825 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from pathlib import Path
|
|
import argparse
|
|
import re
|
|
|
|
if __name__== '__main__':
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('input')
|
|
parser.add_argument('output')
|
|
args = parser.parse_args()
|
|
|
|
input_lines = Path(args.input).read_text(encoding='utf-8').splitlines()
|
|
with Path(args.output).open('w', encoding='utf-8') as out:
|
|
write = True
|
|
for l in input_lines:
|
|
if l.startswith('CUT_OUT_BEGIN'):
|
|
write = False
|
|
|
|
if write and l:
|
|
stripped = re.sub(r'^\s+', '', l)
|
|
stripped = re.sub(r'\s*,\s*', ',', stripped)
|
|
if not stripped.isspace() and stripped:
|
|
out.write('%s\n' % stripped)
|
|
|
|
if l.startswith('CUT_OUT_END'):
|
|
write = True
|