Files
openwrt_yocto/poky/scripts/git
T
francis.wang 4c86c082a2 Initial commit: OpenWrt-Yocto monorepo
Combine poky (Yocto scarthgap), meta-openembedded (scarthgap), and
meta-openwrt into a single repository.

Components:
- poky/             Yocto core framework (BitBake + OE-Core)
- meta-openembedded/ Community layers (meta-oe, meta-python, meta-networking)
- meta-openwrt/     OpenWrt customization layer
- setup-env.sh      One-click build environment setup
- README.md         Project documentation
2026-07-11 13:28:01 +08:00

31 lines
711 B
Python
Executable File

#!/usr/bin/env python3
#
# Copyright OpenEmbedded Contributors
#
# SPDX-License-Identifier: MIT
#
# Wrapper around 'git' that doesn't think we are root
import os
import shutil
import sys
os.environ['PSEUDO_UNLOAD'] = '1'
# calculate path to the real 'git'
path = os.environ['PATH']
# we need to remove our path but also any other copy of this script which
# may be present, e.g. eSDK.
replacements = [os.path.dirname(sys.argv[0])]
for p in path.split(":"):
if p.endswith("/scripts"):
replacements.append(p)
for r in replacements:
path = path.replace(r, '/ignoreme')
real_git = shutil.which('git', path=path)
if len(sys.argv) == 1:
os.execl(real_git, 'git')
os.execv(real_git, sys.argv)