Simple update script for Slackware

For getting to work this script, packages zenity and xterm must be installed.

The Script:

#!/bin/sh

zenity --question --text "Would you like to check updates?"
if [ $? = 0 ];
then

xterm -e su -c 'xterm -e slackpkg update' root
else exit 0
fi

zenity --question --text "Would you like to install updates?"
if [ $? = 0 ];
then
xterm -e su -c 'xterm -e slackpkg install-new && slackpkg upgrade-all' root && zenity --info --text "System Upgraded"

fi
exit 1