mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Make it more resilient
This commit is contained in:
@@ -4,8 +4,13 @@
|
|||||||
# omarchy:args=<packages...>
|
# omarchy:args=<packages...>
|
||||||
# omarchy:requires-sudo=true
|
# omarchy:requires-sudo=true
|
||||||
|
|
||||||
|
installed=()
|
||||||
for pkg in "$@"; do
|
for pkg in "$@"; do
|
||||||
if pacman -Q "$pkg" &>/dev/null; then
|
if pacman -Q "$pkg" &>/dev/null; then
|
||||||
sudo pacman -Rns --noconfirm "$pkg"
|
installed+=("$pkg")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if (( ${#installed[@]} > 0 )); then
|
||||||
|
sudo pacman -Rns --noconfirm "${installed[@]}"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user