#!/bin/sh if [ ! -d "./BUILD" ]; then echo "Please run this script from the same level where the BUILD dir is contained" exit 1 fi pushd $(ls -d BUILD/kernel-*/linux* | tail -n1) cp -a $(ls ../../../SOURCES/defconfig-* | grep -v .sh$) . first=1 for arch in x86_64 i386 arm64 arm; do for config in $(ls defconfig-$arch-* | grep -v .sh$); do echo "updating config: $config" mv $config .config yes '' | make oldconfig ARCH=$arch mv .config $config if [ $first == 1 ]; then first=0 # First time reuse the selections from first one to avoid answering same questions many times # This means ithe user needs to remember when something is specific to x86_64-desktop to disable it in others for arch2 in x86_64 i386 arm64 arm; do for config2 in $(ls defconfig-$arch2-* | grep -v .sh$); do [ "$config" != "$config2" ] && diff -u ../../../SOURCES/$config $config | sed -n 's/^\+//p' done done fi done done cp -af $(ls defconfig-* | grep -v .sh$) ../../../SOURCES/ popd