facf0c92e0
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.
18 lines
411 B
Python
Executable File
18 lines
411 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
|
|
if len(sys.argv) < 4:
|
|
print("Usage: {0} <filename> <variable> <output>")
|
|
|
|
with open(sys.argv[1], "r", encoding="utf-8", errors="backslashreplace") as f:
|
|
in_data = f.read()
|
|
|
|
b = [r"\x{:02x}".format(ord(c)) for c in in_data]
|
|
|
|
out_data = 'const char {0}[] = "'.format(sys.argv[2])
|
|
out_data += "".join(b) + '";\n'
|
|
|
|
with open(sys.argv[3], "w") as f:
|
|
f.write(out_data)
|