From 232c1cb726c809599ce69dbeda7f7f716f106801 Mon Sep 17 00:00:00 2001 From: Mikhail Kobuk Date: Sat, 6 Apr 2024 16:00:01 +0300 Subject: Pre-EUPM build draft TODO: convert to fakeroot TODO: separate most modules TODO: revise config TODO: adjust logging TODO: rework patch listing TODO: update patch selection --- patch.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 patch.sh (limited to 'patch.sh') diff --git a/patch.sh b/patch.sh new file mode 100755 index 0000000..fc1a6a3 --- /dev/null +++ b/patch.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +cd $1 + +for pch in ../*.patch; do + printf "Applying patch %s...\n" "$pch" + patch -Np1 < "$pch" | sed 's/^/--> /g' + if [ "$?" == "0" ]; then + printf "[OK] Applying patch %s [OK]\n" "$pch" + else + printf "[ERR!!!] Applying patch %s [ERR!!!]\n" "$pch" + if [ "$2" != "skip" ]; then + echo "assuming error is critical, aborting\n" + exit 1 + fi + fi + + touch ../patch.ok +done -- cgit v1.2.3