Addet remove question
This commit is contained in:
parent
8387f4802e
commit
2a0e9c7919
1 changed files with 15 additions and 15 deletions
30
test.sh
30
test.sh
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue