aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkern9
1 files changed, 7 insertions, 2 deletions
diff --git a/kern b/kern
index 040d150..cdd2d8d 100755
--- a/kern
+++ b/kern
@@ -102,10 +102,15 @@ clean_kernel() {
sudo eclean-kernel -An3
}
+strip_config() {
+ sed -nE '/^(# )?CONFIG_.*/p' "$1"
+}
+
test_diff() {
dt=$(mktemp)
- sed -nE '/^(# )?CONFIG_.*/p' "$(get_running_config)" > "$dt"
- if ! sed -nE '/^(# )?CONFIG_.*/p' .config | diff -q "$dt" -; then
+ strip_config "$(get_running_config)" > "$dt"
+
+ if ! strip_config .config | diff -q "$dt" -; then
diff_kernel || true
printf "Continue? [y/N] "
read -r response