commit: d407fd36b2ebbc10801f30e5caea99fc68717338 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Thu Mar 21 20:58:30 2019 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Thu Mar 21 20:58:30 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=d407fd36
Show output of patch command only in loglevel >=2 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> gen_compile.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gen_compile.sh b/gen_compile.sh index 7c38859..6e0d107 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -212,6 +212,11 @@ apply_patches() { if [ -d "${patchdir}" ] then + local silent="-s " + if [[ "${LOGLEVEL}" -gt 1 ]]; then + silent= + fi + print_info 1 "$(getIndent 3)${util}: >> Applying patches..." for i in ${patchdir}/*{diff,patch} do @@ -220,7 +225,7 @@ apply_patches() { for j in `seq 0 5` do patch -p${j} --backup-if-mismatch -f < "${i}" --dry-run >/dev/null && \ - patch -p${j} --backup-if-mismatch -f < "${i}" + patch ${silent}-p${j} --backup-if-mismatch -f < "${i}" if [ $? = 0 ] then patch_success=1