Skip to content

Commit 5795b36

Browse files
authored
Adding GUI messages for zenity installation in gui_update_1.sh
Now it is showing successful message after installing zenity package in your machine.
1 parent 5a7cd05 commit 5795b36

1 file changed

Lines changed: 24 additions & 7 deletions

File tree

gui_update_1.sh

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,31 @@ then
3333
echo -e "$r Please run \'~$ sudo apt install zenity\'\n before run this script $u" #zenity installation command
3434
zenity --warning --text="No Zenity packages found" --width=320 --height=150 --timeout=3 --title="GUI Update & Upgrade"
3535
bell_sound
36-
zenity --question --text="Do you like to installed it in your machine?" --width=320 --height=150 --timeout=5 --title="GUI Update & Upgrade"
37-
if [[ $? -eq 0 ]]
36+
zenity --question --text="Do you like to installed it in your machine?" --width=320 --height=150 --timeout=5 \
37+
--title="GUI Update & Upgrade"
38+
if [[ $? -ne 0 ]]
3839
then
39-
pass=$(zenity --password --width=320 --height=150 --timeout=10 --title="GUI Update & Upgrade")
40-
$pass | sudo apt install zenity -y
41-
else
42-
exit
43-
fi
40+
bell_sound
41+
pass=$(zenity --password --width=320 --height=150 --timeout=10 --title="GUI Update & Upgrade" --auto-kill)
42+
bell_sound
43+
$pass | sudo apt install zenity -y > error.txt
44+
45+
if [[ $? -eq 0 ]]
46+
then
47+
bell_sound
48+
zenity --info --text="The zenity package installed successfully.Now run again this script." \
49+
--width=320 --height=150 --title="GUI Update & Upgrade" --timeout=3
50+
else
51+
bell_sound
52+
zenity --text-info --filename="error.txt" --text="Error" --width=320 --height=150 -\
53+
-title="GUI Update & Upgrade"
54+
fi
55+
else
56+
exit
57+
58+
fi
59+
60+
4461
else
4562
pass=$(zenity --password --width=320 --height=150 --timeout=10 --title="GUI Update & Upgrade") #Storing password into pass variable
4663
(

0 commit comments

Comments
 (0)