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