65 lines
1.7 KiB
Plaintext
65 lines
1.7 KiB
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
|
||
|
|
||
|
################
|
||
|
#Check for root#
|
||
|
################
|
||
|
if [ ! $USERNAME = "root" ]; then
|
||
|
pkexec /usr/share/browser-manager/vivaldi/uninstall
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
##########
|
||
|
#Question#
|
||
|
##########
|
||
|
zenity --question --title="Continue?" --text "Are you sure you want to remove Vivaldi?"
|
||
|
|
||
|
if [ ! $? -eq 0 ]; then
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
###################################
|
||
|
#Check if program is not installed#
|
||
|
###################################
|
||
|
dpkg --get-selections | grep -q "vivaldi-stable* install"
|
||
|
|
||
|
if [ ! $? -eq 0 ]; then
|
||
|
if [ ! -e "/usr/bin/vivaldi" ]; then
|
||
|
zenity --info --title="Information" --text="Vivaldi is not installed!"
|
||
|
exit 0
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
###############################
|
||
|
#Check if program is installed#
|
||
|
###############################
|
||
|
|
||
|
if [ -e "/usr/bin/vivaldi" ]; then
|
||
|
|
||
|
###################
|
||
|
#Uninstall program#
|
||
|
###################
|
||
|
sudo apt-get remove vivaldi-stable -y && rm /etc/apt/sources.list.d/vivaldi.list && apt-get update | zenity --progress --no-cancel --no-cancel --title="Uninstalling..." --text="Uninstalling..." --pulsate --auto-close
|
||
|
fi
|
||
|
######################
|
||
|
#Double Check Package#
|
||
|
######################
|
||
|
|
||
|
if [ ! -e "/usr/bin/vivaldi" ]; then
|
||
|
zenity --info --title="Uninstalled Vivaldi" --text="Vivaldi uninstalled successfully!"
|
||
|
exit 0
|
||
|
fi
|
||
|
#######
|
||
|
#Error#
|
||
|
#######
|
||
|
zenity --error --text="An error occured." --title="Error"
|
||
|
exit 0
|
||
|
|
||
|
|
||
|
#######
|
||
|
#Error#
|
||
|
#######
|
||
|
zenity --error --text="An error occured." --title="Error"
|
||
|
exit 0
|