This commit is contained in:
pika 2025-05-11 13:10:29 +02:00
parent 49a7ad14ca
commit d6ba8c65b3

View file

@ -9,7 +9,7 @@
# WHY:
# This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user
# distro = <distro name, like 'arch', 'debian', 'ubuntu', 'fedora', 'opensuse' or 'alpine'>
# distro = <distro name, like 'arch', 'debian', 'fedora'..>
# arch = bool
# fedora = bool
# opensuse = bool....
@ -18,12 +18,21 @@
# CAUTION:
# This only wokrs for generic package names, like neovim, or vim, or tmux etc..
# not every package packagemanager has the same packagenames for their packages..
if command_exists curl; then
eval "$(curl -fsSL https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh)"
else
echo "curl is required, but missing.."
exit 1
fi
getImports() {
i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"
import="$(mktemp)"
if command_exists curl; then
curl -fsSL $i -o $import
else
echo "curl is required, but missing.."
exit 1
fi
source "$import"
sleep 0.3
rm "$import"
echo_warning "cleaned $import"
}
checkAndInstall() {
for deps in "$@"; do
@ -80,19 +89,23 @@
fi
}
case "$1" in
--silent | -s)
echo_info "updating sources and installing base dependencies.."
silentexec installBuildDependencies
echo_info "cloning sources.."
silentexec cloneSources
echo_info "installing neovim.."
silentexec makeInstall
;;
*)
installBuildDependencies
cloneSources
makeInstall
;;
esac
if getImports; then
case "$1" in
--silent | -s)
echo_info "Updating sources and installing base dependencies.."
silentexec installBuildDependencies
echo_info "Cloning neovim sources.."
silentexec cloneSources
echo_info "Building neovim.."
silentexec makeInstall
;;
*)
installBuildDependencies
cloneSources
makeInstall
;;
esac
fi
}