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.
25 lines
713 B
Bash
Executable File
25 lines
713 B
Bash
Executable File
#!/bin/bash
|
|
INTERPRETER_UNDER_TEST="$1"
|
|
if [[ ! -x "${INTERPRETER_UNDER_TEST}" ]]; then
|
|
echo "Interpreter must be the command line argument."
|
|
exit 4
|
|
fi
|
|
EXECUTABLE="$0" exec "${INTERPRETER_UNDER_TEST}" -E - <<END_OF_PYTHON
|
|
import os
|
|
import zipfile
|
|
|
|
namespace = {}
|
|
|
|
filename = os.environ['EXECUTABLE']
|
|
print(f'Opening {filename} as a zipfile.')
|
|
with zipfile.ZipFile(filename, mode='r') as exe_zip:
|
|
for file_info in exe_zip.infolist():
|
|
data = exe_zip.read(file_info)
|
|
exec(data, namespace, namespace)
|
|
break # Only use the first file in the archive.
|
|
|
|
print('Favorite number in executable:', namespace["FAVORITE_NUMBER"])
|
|
|
|
### Archive contents will be appended after this file. ###
|
|
END_OF_PYTHON
|