testing
This commit is contained in:
parent
5c48e57e0c
commit
4cf5726882
1 changed files with 34 additions and 12 deletions
46
test.sh
46
test.sh
|
@ -65,21 +65,25 @@ spin-get-dependencies() {
|
|||
done
|
||||
|
||||
check "pkglist: ${pkglist[*]}"
|
||||
line
|
||||
|
||||
pen red "$deplist"
|
||||
pkglist=${deplist[@]}
|
||||
for dep in "${deplist[@]}"; do
|
||||
pen bold grey "Dep: $dep"
|
||||
done
|
||||
|
||||
for pk in "${pkglist[@]}"; do
|
||||
pen bold red "Pkg: $pk"
|
||||
done
|
||||
|
||||
line
|
||||
|
||||
exit 1
|
||||
# pen red "$deplist"
|
||||
# pkglist=${deplist[@]}
|
||||
|
||||
# for dep in "${deplist[@]}"; do
|
||||
# pen bold grey "Dep: $dep"
|
||||
# done
|
||||
|
||||
spin-installation "${deplist[@]}"
|
||||
|
||||
# for pk in "${pkglist[@]}"; do
|
||||
# pen bold red "Pkg: $pk"
|
||||
# done
|
||||
|
||||
# line
|
||||
|
||||
# exit 1
|
||||
;;
|
||||
*)
|
||||
echo_error "There are no dependencies to install for $distro"
|
||||
|
@ -88,6 +92,24 @@ spin-get-dependencies() {
|
|||
esac
|
||||
}
|
||||
|
||||
spin-installation() {
|
||||
local err out
|
||||
local pkgs="$@"
|
||||
|
||||
for pkg in "${pkgs[@]}"; do
|
||||
spin bold yellow "Installing $pkg"
|
||||
if run --err err --out out pkg-install "$pkg"; then
|
||||
check "Installed $pkg"
|
||||
line
|
||||
else
|
||||
throw "$pkg could not get installed.."
|
||||
echo_error "${err:-}"
|
||||
echo_note "${out:-}"
|
||||
line
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
main() {
|
||||
local err
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue