wip
This commit is contained in:
parent
26275e72bb
commit
b9f19840dd
1 changed files with 13 additions and 4 deletions
|
@ -13,7 +13,7 @@ source-script() {
|
||||||
if command-exists curl; then
|
if command-exists curl; then
|
||||||
curl -fsSL $url -o $import
|
curl -fsSL $url -o $import
|
||||||
elif command-exists wget; then
|
elif command-exists wget; then
|
||||||
wget -o $import $url
|
wget -O $import $url
|
||||||
else
|
else
|
||||||
echo "curl/wget is required, but missing.."
|
echo "curl/wget is required, but missing.."
|
||||||
exit 69
|
exit 69
|
||||||
|
@ -70,6 +70,7 @@ get-dependencies() {
|
||||||
"tldr"
|
"tldr"
|
||||||
"oh-my-posh"
|
"oh-my-posh"
|
||||||
"eza"
|
"eza"
|
||||||
|
"dog"
|
||||||
"ytui-bin"
|
"ytui-bin"
|
||||||
)
|
)
|
||||||
depsAlpine=()
|
depsAlpine=()
|
||||||
|
@ -90,13 +91,21 @@ get-dependencies() {
|
||||||
#
|
#
|
||||||
declare -n pkgArray="${deps[$distro]}"
|
declare -n pkgArray="${deps[$distro]}"
|
||||||
|
|
||||||
|
local pkg pkglist=()
|
||||||
|
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
debian | ubuntu | arch | fedora | alpine | opensuse)
|
debian | ubuntu | arch | fedora | alpine | opensuse)
|
||||||
pen bold blue "Installing base packages.."
|
pen bold blue "Getting package counter.."
|
||||||
|
|
||||||
check-and-install ${generalDeps[@]}
|
for pkg in "${generalDeps[@]} ${pkgArray[@]}"; do
|
||||||
|
if ! command-exists $pkg; then
|
||||||
|
pkglist=("$pkg")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
check-and-install ${pkgArray[@]}
|
check "Done getting packages"
|
||||||
|
|
||||||
|
check-and-install "${pkglist[@]}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo-error "There are no dependencies to install for $distro"
|
echo-error "There are no dependencies to install for $distro"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue