wip
This commit is contained in:
parent
49a7ad14ca
commit
d6ba8c65b3
1 changed files with 35 additions and 22 deletions
23
neovim.sh
23
neovim.sh
|
@ -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,13 +18,22 @@
|
|||
# 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..
|
||||
getImports() {
|
||||
i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"
|
||||
import="$(mktemp)"
|
||||
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
|
||||
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
|
||||
if ! command_exists $deps; then
|
||||
|
@ -80,13 +89,16 @@
|
|||
fi
|
||||
}
|
||||
|
||||
if getImports; then
|
||||
case "$1" in
|
||||
--silent | -s)
|
||||
echo_info "updating sources and installing base dependencies.."
|
||||
echo_info "Updating sources and installing base dependencies.."
|
||||
silentexec installBuildDependencies
|
||||
echo_info "cloning sources.."
|
||||
|
||||
echo_info "Cloning neovim sources.."
|
||||
silentexec cloneSources
|
||||
echo_info "installing neovim.."
|
||||
|
||||
echo_info "Building neovim.."
|
||||
silentexec makeInstall
|
||||
;;
|
||||
*)
|
||||
|
@ -95,4 +107,5 @@
|
|||
makeInstall
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue