Proposed changes to the _use_current functionality #1

Merged
JeremyStarTM merged 3 commits from yarost12/aur-linux-clear:YF-use-current-update into master 2024-11-19 01:57:27 +01:00
Showing only changes of commit 0d4fdeb204 - Show all commits

View file

@ -173,6 +173,10 @@ apply_patches() {
} }
copy_defconfig() { copy_defconfig() {
local _cur_major_ver="$(zcat /proc/config.gz | grep Linux | grep -o '[0-9]*[0-9]\.[0-9]*[0-9]')"
[[ ${_cur_major_ver} != ${_kernel_major} ]] &&
warning "Major version was updated, you should regen the defconfig"
if [[ -s /proc/config.gz ]]; then if [[ -s /proc/config.gz ]]; then
# modprobe configs # modprobe configs
zcat /proc/config.gz > ./.config zcat /proc/config.gz > ./.config
@ -293,6 +297,7 @@ create_defconfig() {
prepare() { prepare() {
cd "${_src_linux}" || exit 1 cd "${_src_linux}" || exit 1
apply_patches apply_patches
[[ -n "${_use_current}" ]] && copy_defconfig [[ -n "${_use_current}" ]] && copy_defconfig