Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-18 10:46:10 +0200
committerErich Eckner <git@eckner.net>2018-05-18 10:46:10 +0200
commit3a6c7c65cf4dc396e0e4c960f9c2c8568b7fb7ec (patch)
treee7b62f0dac59cd9a6a22bdd59889ffa83dc8ebdd
parentd4cae11ccf5ba56d624a916429368ea60f5e2a10 (diff)
update-kernel-config: detect no-change
-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}" | \