supporting aur packages for install / uninstall cmd
This commit is contained in:
committer@t470p
2024-11-27 06:03:09 -05:00
parent 6f4365e633
commit 4415c4e915

View File

@@ -195,8 +195,7 @@ if [ ${operation} == "install" ] ; then
if [[ "$parameter" =~ ^aur:* ]]; then
echo "Install AUR package '${parameter}'"
echo ${list_aur} > /tmp/list_aur.txt
sudo -u ${user} bash -c 'yay -S --needed --noconfirm --timeupdate $(</tmp/list_aur.txt)'
sudo -u ${user} bash -c 'yay -S --needed --noconfirm --timeupdate ${parameter}'
else
echo "Install Arch package '${parameter}'"
pacman -S ${parameter}
@@ -235,6 +234,10 @@ if [ ${operation} == "uninstall" ] ; then
param_check "${parameter}" "no package name given"
if [[ "$operation" =~ ^aur:* ]]; then
operation=${operation:4}
fi
# uninstall program and remove orphans
pacman -Rns ${parameter}