fix removing dependency packages
This commit is contained in:
parent
e91d808d5b
commit
c493d0b147
14
pkgtxt
14
pkgtxt
|
@ -56,11 +56,17 @@ update() {
|
|||
esac
|
||||
done
|
||||
|
||||
# installing all missing packages
|
||||
pacman -S --noconfirm $(cat $to_install) 2>/dev/null
|
||||
# remove all packages to remove
|
||||
while IFS='' read -r LINE || [ -n "${LINE}" ]; do
|
||||
if pacman -Qii "$LINE" | grep "^Required By.*None$"; then
|
||||
pacman -Rs --noconfirm "$LINE"
|
||||
else
|
||||
pacman -D --asdeps "$LINE"
|
||||
fi
|
||||
done < $to_remove
|
||||
|
||||
# removing all packages to remove
|
||||
pacman -Rs --noconfirm $(cat $to_remove) 2>/dev/null
|
||||
# install all missing packages
|
||||
pacman -S --noconfirm $(cat $to_install) 2>/dev/null
|
||||
|
||||
remove_tmps
|
||||
|
||||
|
|
Loading…
Reference in New Issue