3 TEXTEDITOR
=$
(cat ~
/.pacmangui
/texteditor
)
4 MIRRORFILE
=$
(cat ~
/.pacmangui
/mirrorlistfile
)
5 TERMINAL
=$
(cat ~
/.pacmangui
/terminal
)
10 USETERM
="gnome-terminal -x"
16 USETERM
="xfce4-terminal -x"
23 ########################
28 $USETERM sudo yaourt
-Sy
31 until [ ! $
(pidof sudo
) ]; do
34 while [ -e /var
/lib
/pacman
/db.lck
]; do
38 notify-send
-i /usr
/share
/icons
/gnome
/32x32
/apps
/system-software-update.png
-t 7500 "PacGUI - Finished." "Yaourt database refreshed."
46 $USETERM sudo yaourt
-Su --aur
49 until [ ! $
(pidof sudo
) ]; do
52 while [ -e /var
/lib
/pacman
/db.lck
]; do
57 notify-send
-i /usr
/share
/icons
/gnome
/32x32
/apps
/system-software-update.png
-t 7500 "PacGUI - Finished." "AUR packages upgraded."
59 tail -n 50 /var
/log
/pacman.log |
tac | zenity
--text-info --height=600 --width=600
63 ######################
66 BUSCA
=$
(zenity
--entry --title="Yaourt search" --width=350 --text="Type in as many keywords as you want to search for") || mainyaourt
67 echo "ColorMod TextOnly" > ~
/.yaourtrc
68 RES_BUSCA
=$
(yaourt
-Ss $BUSCA)
70 RES_BUSCA_SORT
=$
(echo $RES_BUSCA |
grep / |
tr -s [:blank
:] "\n" |
grep /)
71 echo "$RES_BUSCA" | zenity
--text-info --width=500 --height=500 --title="Results for "\"$BUSCA""\" &
73 INFO
=$
(zenity
--list --title="Select package" --text="Select package to\nshow detailed info about it" --width=350 --height=500 --column=Paquete
$RES_BUSCA_SORT) || search
74 INFO_SORT
=$
(echo $INFO |
tr "|" " ")
75 echo "ColorMod TextOnly" > ~
/.yaourtrc
76 zenity
--info --title="Info for "\"$INFO""\" --text="$(echo "$
(yaourt
-Si $INFO_SORT)" | grep -v Packager)"
81 ######################
85 INST
=$
(zenity
--entry --title="Install AUR package." --width=350 --text="Type in the package name you wish to install") || mainyaourt
86 $USETERM sudo yaourt
-S $INST
89 until [ ! $
(pidof sudo
) ]; do
92 while [ -e /var
/lib
/pacman
/db.lck
]; do
95 notify-send
-i /usr
/share
/icons
/gnome
/32x32
/apps
/system-software-update.png
-t 7500 "PacGUI - Finished" "You may look up the log file anytime from the application menu or /var/log/pacman.log"
96 tail -n 50 /var
/log
/pacman.log |
tac | zenity
--text-info --height=600 --width=600
100 #####################
102 function search_install
{
104 BUSCA_I
=$
(zenity
--entry --title="Repository search." --width=350 --text="Type in as many keywords as you want to search for.") || mainyaourt
105 echo "ColorMod TextOnly" > ~
/.yaourtrc
106 RES_BUSCA_I
=$
(yaourt
-Ss $BUSCA_I)
108 RES_BUSCA_I_SORT
=$
(echo $RES_BUSCA_I |
grep / |
tr -s [:blank
:] "\n" |
grep / |
tr -s "/" " ")
110 echo "$RES_BUSCA_I" | zenity
--text-info --width=500 --height=500 --title="Packages in AUR found for "\"$BUSCA_I""\" &
112 CHECK
=$
(zenity
--list --radiolist --title="Package installation." --text="Select package to be installed" --width=350 --height=500 --column=Instalar
--column=Paquete
$RES_BUSCA_I_SORT) || busca_inst
115 CHECK_INST
=$
(echo $CHECK |
tr "|" " ")
116 $USETERM sudo yaourt
-S $CHECK_INST
119 until [ ! $
(pidof sudo
) ]; do
122 while [ -e /var
/lib
/pacman
/db.lck
]; do
126 notify-send
-i /usr
/share
/icons
/gnome
/32x32
/apps
/system-software-update.png
-t 7500 "PacGUI - Finished." "You may look up the log file anytime from the application menu or /var/log/pacman.log"
127 tail -n 50 /var
/log
/pacman.log |
tac | zenity
--text-info --height=600 --width=600
135 #####################
139 function mainyaourt
{
141 ACCION
=$
(zenity
--list --title="Yaourt operations" --text="Select your desired option" --height=250 --width=350 --column="" --column="Sections" "1" "Refresh database" "2" "Upgrade AUR packages" "3" "Package search" "4" "Install" "5" "Search and install" ) ||
exit