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!"
|
check "Dependency list generated!"
|
||||||
pen red bold "There are ${#deplist[@]} items to install.."
|
pen red bold "There are ${#deplist[@]} items to install.."
|
||||||
# local pkgs="$@"
|
# local pkgs="$@"
|
||||||
for ((i = 0; i < "${#deplist[@]}"; i++)); do
|
# for ((i = 0; i < "${#deplist[@]}"; i++)); do
|
||||||
for pkg in "${deplist[@]}"; do
|
for pkg in "${deplist[@]}"; do
|
||||||
spin bold yellow "Installing $pkg"
|
spin bold yellow "Installing $pkg"
|
||||||
if run --err err --out out pkg-install "$pkg"; then
|
if run --err err --out out pkg-install "$pkg"; then
|
||||||
check "Installed $pkg"
|
check "Installed $pkg"
|
||||||
line
|
line
|
||||||
else
|
else
|
||||||
check "$pkg could not get installed.."
|
check "$pkg could not get installed.."
|
||||||
echo_error "${err:-}"
|
echo_error "${err:-}"
|
||||||
echo_note "${out:-}"
|
echo_note "${out:-}"
|
||||||
line
|
line
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
# done
|
||||||
check "debug"
|
check "debug"
|
||||||
else
|
else
|
||||||
throw "Dependencies could not get generated!"
|
throw "Dependencies could not get generated!"
|
||||||
exit 69
|
exit 69
|
||||||
fi
|
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
|
for pkg in "${deplist[@]}"; do
|
||||||
spin bold red "Removing $pkg"
|
spin bold red "Removing $pkg"
|
||||||
if run --err err --out out pkg-remove "$pkg"; then
|
if run --err err --out out pkg-remove "$pkg"; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue