summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xupdate-kernel-config7
1 files changed, 6 insertions, 1 deletions
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}" | \