This repository has been archived on 2025-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
home-assistant-yellow/patch-uboot.sh
Dustin C. Hatch b9696ab003 uboot: Apply patches outside container
When running inside a rootless Podman container on a SELinux-enabled
host, the `patch` command fails because it cannot copy SELinux labels
from the original file to the patched file.  This only happens patching
files that are located in a bind mount.
2023-02-13 23:24:36 -06:00

18 lines
309 B
Bash
Executable File

#!/bin/sh
# vim: set sw=4 ts=4 sts=4 et :
if [ -f u-boot/.patched ]; then
exit 0
fi
rc=0
cd u-boot || exit
for x in ../patches/uboot/*.patch; do
[ -f "${x}" ] || continue
printf 'Applying patch %s ...\n' "${x##*/}"
patch -p1 < "${x}" || rc=$?
done
if [ $rc -eq 0 ]; then
: > .patched
fi