From 0ba83ff22bc3ffcdb183c388c61bf76e5f8224fa Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 7 Oct 2025 10:16:07 +0200 Subject: kbuild: Adapt the uninstall.sh script to profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moreover, some subtle fixes have been added, like using 'update-bootloader' instead of 'update-grub' in SUSE-like systems, and having -f in 'rm' commands so uninstall.sh can be run safely multiple times without erroring out. Signed-off-by: Miquel Sabaté Solà --- bin/kbuild | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'bin/kbuild') diff --git a/bin/kbuild b/bin/kbuild index 23cef35..ec084dd 100755 --- a/bin/kbuild +++ b/bin/kbuild @@ -314,7 +314,7 @@ EXT \$EDITOR /etc/grub.d/40_custom # And update grub itself. -update-grub +update-bootloader SCRIPT ;; *) @@ -338,21 +338,32 @@ if [ ! -f files.txt ]; then fi xargs rm -f < files.txt -rm -r /usr/lib/modules/$name -rm -r /boot/dtbs/$name -rm -r /usr/lib/firmware/$name -rm /boot/initrd.img-$name +rm -rf /usr/lib/modules/$name +rm -rf /boot/dtbs/$name +rm -rf /usr/lib/firmware/$name +rm -f /boot/initrd-$name +rm -f /boot/initrd.img-$name if [ -z "\$EDITOR" ]; then EDITOR=vi fi -if [ -f /boot/extlinux/extlinux.conf ]; then - \$EDITOR /boot/extlinux/extlinux.conf -else - \$EDITOR /etc/grub.d/40_custom - update-grub -fi + +SCRIPT + +case "$PROFILE" in + "vf2") +cat <