From 3a6c7c65cf4dc396e0e4c960f9c2c8568b7fb7ec Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 18 May 2018 10:46:10 +0200 Subject: update-kernel-config: detect no-change --- update-kernel-config | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/update-kernel-config b/update-kernel-config index 7541058..3962426 100755 --- a/update-kernel-config +++ b/update-kernel-config @@ -21,10 +21,15 @@ fi diff=$( git -C "/usr/src/archlinux/packages/$2/repos/$1-x86_64" diff "${old_revision}" HEAD -- config | \ - grep '^[+-]' | \ + grep '^[+-].' | \ grep -v '^+++\|^---' ) +if [ -z "${diff}" ]; then + >&2 echo 'nothing changed.' + exit 1 +fi + { grep -vxF "$( printf '%s\n' "${diff}" | \ -- cgit v1.2.3-70-g09d2