Skip to content
update_config.sh 359 B
Newer Older
Seblu's avatar
Seblu committed
#!/bin/bash -e
Seblu's avatar
Seblu committed
SRC=src/linux
CONFIG=config.x86_64

config_equal()
{
Seblu's avatar
Seblu committed
	diff -q -s "$SRC/.config" "$CONFIG" &>/dev/null
if config_equal; then
	(cd "$SRC" && make ${1:-menuconfig})
Seblu's avatar
Seblu committed
	[[ -e "$SRC" ]] && rm -rf "$SRC"
	makepkg --nobuild --force
	(cd "$SRC" && make ${1:-oldconfig})
if ! config_equal; then
Seblu's avatar
Seblu committed
	cp -v "$SRC/.config" "$CONFIG"
Seblu's avatar
Seblu committed
	updpkgsums
fi