#!/bin/bash if [[ $1 == "check" ]]; then sudo apt update if apt list --upgradable 2> /dev/null | grep -v '^Listing' | grep -q .; then exo-open --launch TerminalEmulator "$0" fi else echo -e "$(tput setaf 3)Please wait while the system in upgrading...$(tput sgr0)" sudo apt --fix-broken install -y sudo apt autoremove -y sudo apt upgrade -y echo -e "$(tput setaf 2)Done! You can now close this window $(tput sgr0)" fi exit 0