From 9816127f37e94957171b9ae76154f1f77f029b5d Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Sat, 7 Oct 2023 19:41:04 +0530 Subject: [PATCH] fix patching if patches are not found and also handle the diff return value gracefully --- master.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/master.inc b/master.inc index 92a496e..f5805c4 100644 --- a/master.inc +++ b/master.inc @@ -66,7 +66,7 @@ if [ -f ../SOURCES/linux-%{version}.tar.sign ]; then rm -vf linux-%{version}.tar fi %setup -q -n %{src_dir} -find ../../SOURCES -type f -name "patch-*.patch" -print0 | sort -z | xargs -t -0 -n 1 patch -p1 -i +find ../../SOURCES -type f -name "patch-*.patch" -print0 | sort -z | xargs --no-run-if-empty -t -0 -n 1 patch -p1 -i # Mangle all Python shebangs to be Python 3 explicitly. # -i specifies the interpreter for the shebang @@ -101,9 +101,10 @@ rm -rf kernel-tfg/ make olddefconfig # diff for viewing later :) -if [ -f .config.old ]; then - diff .config .config.old -fi +# 0 means no diff /diff [1/4] +# 1 means diff +# 2 means trouble +diff .config .config.old || echo "Diffing done" %build %{make} %{?_smp_mflags} PYTHON=%{__python3} %{make_targets}