wip
This commit is contained in:
parent
6d9c1bb395
commit
7e43159da7
1 changed files with 48 additions and 0 deletions
48
yazi.sh
48
yazi.sh
|
@ -57,6 +57,54 @@
|
||||||
rm "$import"
|
rm "$import"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getDependencies() {
|
||||||
|
echo_info "Checking build dependencies.."
|
||||||
|
|
||||||
|
# INFO:
|
||||||
|
# ╭─────────────────────────────────────────────────────────────────────────╮
|
||||||
|
# │ You can define dependencies for various linux distros here. It will │
|
||||||
|
# │ automagically be pulled via the $pkgArray[$distro] variable │
|
||||||
|
# ╰─────────────────────────────────────────────────────────────────────────╯
|
||||||
|
depsDebian=(libpoppler-dev)
|
||||||
|
depsFedora=()
|
||||||
|
depsOpensuse=()
|
||||||
|
depsArch=()
|
||||||
|
depsAlpine=()
|
||||||
|
|
||||||
|
generalDeps=(
|
||||||
|
ffmpeg
|
||||||
|
make
|
||||||
|
gcc
|
||||||
|
7zip
|
||||||
|
)
|
||||||
|
|
||||||
|
declare -A deps=(
|
||||||
|
[debian]="depsDebian"
|
||||||
|
[ubuntu]="depsUbuntu"
|
||||||
|
[fedora]="depsFedora"
|
||||||
|
[arch]="depsArch"
|
||||||
|
[alpine]="depsAlpine"
|
||||||
|
[opensuse]="depsOpensuse"
|
||||||
|
)
|
||||||
|
|
||||||
|
# INFO:
|
||||||
|
# ╭────────────────────────────────────────────────────────────────╮
|
||||||
|
# │ This variable stores the packages you provided for each distro │
|
||||||
|
# ╰────────────────────────────────────────────────────────────────╯
|
||||||
|
declare -n pkgArray="${deps[$distro]}"
|
||||||
|
|
||||||
|
case "$distro" in
|
||||||
|
debian | ubuntu | arch | fedora | alpine | opensuse)
|
||||||
|
checkAndInstall "${generalDeps[@]}"
|
||||||
|
checkAndInstall "${pkgArray[@]}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo_error "There are no dependencies to install for $distro"
|
||||||
|
return 69
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
checkDependencies() {
|
checkDependencies() {
|
||||||
local deps=(
|
local deps=(
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue