Peppermint-Classic-Build-Files/PeppermintOS-Classic-i386/config/includes.chroot/usr/share/browser-manager/web/uninstall

60 lines
1.6 KiB
Plaintext
Raw Normal View History

#!/bin/bash
################
#Check for root#
################
if [ ! $USERNAME = "root" ]; then
pkexec /usr/share/browser-manager/web/uninstall
exit 0
fi
##########
#Question#
##########
zenity --question --title="Continue?" --text "Are you sure you want to remove Web?"
if [ ! $? -eq 0 ]; then
exit
fi
###################################
#Check if program is not installed#
###################################
dpkg --get-selections | grep -P -q "epiphany-browser\t*install"
if [ $? -ne 0 ]; then
if [ ! -e "/usr/bin/epiphany-browser" ]; then
zenity --info --title="Information" --text="Web is not installed!"
exit 0
fi
fi
###################
#Uninstall program#
###################
apt-get -y remove epiphany-browser epiphany-browser-data | zenity --progress --no-cancel --title="Uninstalling..." --text="Uninstalling..." --pulsate --auto-close
######################
#Double Check Package#
######################
dpkg --get-selections | grep -P -q "epiphany-browser\t*install"
if [ $? -ne 0 ]; then
if [ ! -e "/usr/bin/epiphany-browser" ]; then
zenity --info --title="Uninstalled Web" --text="Web uninstalled successfully!"
exit 0
fi
#######
#Error#
#######
zenity --error --text="An error occured." --title="Error"
exit 0
fi
#######
#Error#
#######
zenity --error --text="An error occured." --title="Error"
exit 0