Addet remove question

This commit is contained in:
pika 2025-05-22 16:17:51 +02:00
parent 8387f4802e
commit 2a0e9c7919

30
test.sh
View file

@ -116,28 +116,28 @@ main() {
check "Dependency list generated!"
pen red bold "There are ${#deplist[@]} items to install.."
# local pkgs="$@"
for ((i = 0; i < "${#deplist[@]}"; i++)); do
for pkg in "${deplist[@]}"; do
spin bold yellow "Installing $pkg"
if run --err err --out out pkg-install "$pkg"; then
check "Installed $pkg"
line
else
check "$pkg could not get installed.."
echo_error "${err:-}"
echo_note "${out:-}"
line
continue
fi
done
# for ((i = 0; i < "${#deplist[@]}"; i++)); do
for pkg in "${deplist[@]}"; do
spin bold yellow "Installing $pkg"
if run --err err --out out pkg-install "$pkg"; then
check "Installed $pkg"
line
else
check "$pkg could not get installed.."
echo_error "${err:-}"
echo_note "${out:-}"
line
continue
fi
done
# done
check "debug"
else
throw "Dependencies could not get generated!"
exit 69
fi
if confirm "Do you want to remove all installed packages?"; then
if confirm "Do you want to remove all installed packages?" </dev/tty; then
for pkg in "${deplist[@]}"; do
spin bold red "Removing $pkg"
if run --err err --out out pkg-remove "$pkg"; then