Files
RedBear-OS/recipes/dev/fontconfig/source/conf.d/link_confs.py
T
vasilito ff4ff35918 feat: track all source trees in git — full fork offline-first model
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.
2026-05-14 10:55:53 +01:00

46 lines
1.4 KiB
Python

#!/usr/bin/env python3
import os
import sys
import argparse
import platform
from pathlib import PurePath
if __name__=='__main__':
parser = argparse.ArgumentParser()
parser.add_argument('availpath')
parser.add_argument('confpath')
parser.add_argument('links', nargs='+')
args = parser.parse_args()
if os.path.isabs(args.confpath):
destdir = os.environ.get('DESTDIR')
if destdir:
# c:\destdir + c:\prefix must produce c:\destdir\prefix
confpath = str(PurePath(destdir, *PurePath(args.confpath).parts[1:]))
else:
confpath = args.confpath
else:
confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
if not os.path.exists(confpath):
os.makedirs(confpath)
for link in args.links:
src = os.path.join(args.availpath, link)
dst = os.path.join(confpath, link)
try:
os.remove(dst)
except FileNotFoundError:
pass
try:
os.symlink(os.path.relpath(src, start=args.confpath), dst)
except NotImplementedError:
# Not supported on this version of Windows
break
except OSError as e:
# Symlink privileges are not available
if platform.system().lower() == 'windows' and e.winerror == 1314:
break
raise