Simple update script for openSUSE

Packages zenity and xterm must be installed and the script must be executable (chmod +x the-script)

#!/bin/sh

zenity --question --text "Would you like to check and install updates?"
if [ $? = 0 ];
then
xterm -e su -c 'xterm -e zypper update && zypper -y upgrade' root && zenity --info --text "System Upgraded"
else exit 0
fi

Read also https://puolanka.info/goto/opensuse-and-deltarpm-update/