fix patching if patches are not found and also handle the diff return value gracefully
This commit is contained in:
parent
ed0072bbeb
commit
9816127f37
@ -66,7 +66,7 @@ if [ -f ../SOURCES/linux-%{version}.tar.sign ]; then
|
|||||||
rm -vf linux-%{version}.tar
|
rm -vf linux-%{version}.tar
|
||||||
fi
|
fi
|
||||||
%setup -q -n %{src_dir}
|
%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.
|
# Mangle all Python shebangs to be Python 3 explicitly.
|
||||||
# -i specifies the interpreter for the shebang
|
# -i specifies the interpreter for the shebang
|
||||||
@ -101,9 +101,10 @@ rm -rf kernel-tfg/
|
|||||||
make olddefconfig
|
make olddefconfig
|
||||||
|
|
||||||
# diff for viewing later :)
|
# diff for viewing later :)
|
||||||
if [ -f .config.old ]; then
|
# 0 means no diff /diff [1/4]
|
||||||
diff .config .config.old
|
# 1 means diff
|
||||||
fi
|
# 2 means trouble
|
||||||
|
diff .config .config.old || echo "Diffing done"
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{make} %{?_smp_mflags} PYTHON=%{__python3} %{make_targets}
|
%{make} %{?_smp_mflags} PYTHON=%{__python3} %{make_targets}
|
||||||
|
Loading…
Reference in New Issue
Block a user