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,12 +18,21 @@
# 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..
if command_exists curl; then getImports() {
eval "$(curl -fsSL https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh)" i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"
else import="$(mktemp)"
echo "curl is required, but missing.." if command_exists curl; then
exit 1 curl -fsSL $i -o $import
fi else
echo "curl is required, but missing.."
exit 1
fi
source "$import"
sleep 0.3
rm "$import"
echo_warning "cleaned $import"
}
checkAndInstall() { checkAndInstall() {
for deps in "$@"; do for deps in "$@"; do
@ -80,19 +89,23 @@
fi fi
} }
case "$1" in if getImports; then
--silent | -s) case "$1" in
echo_info "updating sources and installing base dependencies.." --silent | -s)
silentexec installBuildDependencies echo_info "Updating sources and installing base dependencies.."
echo_info "cloning sources.." silentexec installBuildDependencies
silentexec cloneSources
echo_info "installing neovim.." echo_info "Cloning neovim sources.."
silentexec makeInstall silentexec cloneSources
;;
*) echo_info "Building neovim.."
installBuildDependencies silentexec makeInstall
cloneSources ;;
makeInstall *)
;; installBuildDependencies
esac cloneSources
makeInstall
;;
esac
fi
} }