Skip to content

Commit 1748348

Browse files
authored
Update gui_update_1.sh
1 parent 31ca65b commit 1748348

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

gui_update_1.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111

1212
#!/bin/bash
13+
r="\e[1;31m" #red color
14+
u="\e[0m" #reinstall default color
1315

1416

1517
function bell_sound(){
@@ -28,7 +30,16 @@ zenity --version
2830
if [[ $? -ne 0 ]]
2931
then
3032
bell_sound
31-
echo -e "Please run \'~$ sudo apt install zenity\'\n before run this script" #zenity installation command
33+
echo -e "$r Please run \'~$ sudo apt install zenity\'\n before run this script $u" #zenity installation command
34+
zenity --warning --text="No Zenity packages found" --width=320 --height=150 --timeout=3 --title="GUI Update & Upgrade"
35+
zenity --question --text="Do you like to installed it in your machine?" --width=320 --height=150 --timeout=5 --title="GUI Update & Upgrade"
36+
if [[ $? -eq 0 ]]
37+
then
38+
pass=$(zenity --password --width=320 --height=150 --timeout=10 --title="GUI Update & Upgrade")
39+
$pass | sudo apt install zenity -y
40+
else
41+
exit
42+
fi
3243
else
3344
pass=$(zenity --password --width=320 --height=150 --timeout=10 --title="GUI Update & Upgrade") #Storing password into pass variable
3445
(

0 commit comments

Comments
 (0)