aboutsummaryrefslogtreecommitdiffstats
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rwxr-xr-xkern9
1 files changed, 7 insertions, 2 deletions
diff --git a/kern b/kern
index 1f49a67..040d150 100755
--- a/kern
+++ b/kern
@@ -77,7 +77,12 @@ config_kernel() {
diff_kernel() {
diff=${1:-$(get_running_config)}
- nvim -d .config "$diff"
+
+ if command -v git >/dev/null; then
+ git diff --no-index "$diff" .config
+ else
+ diff -u "$diff" .config
+ fi
}
build_kernel() {
@@ -101,7 +106,7 @@ test_diff() {
dt=$(mktemp)
sed -nE '/^(# )?CONFIG_.*/p' "$(get_running_config)" > "$dt"
if ! sed -nE '/^(# )?CONFIG_.*/p' .config | diff -q "$dt" -; then
- diff_kernel
+ diff_kernel || true
printf "Continue? [y/N] "
read -r response
if test "$response" != "y"; then