testing beautiful script
This commit is contained in:
parent
f2b3b09507
commit
79876e23fd
1 changed files with 23 additions and 11 deletions
34
neovim.sh
34
neovim.sh
|
@ -31,7 +31,9 @@
|
||||||
source "$import"
|
source "$import"
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
rm "$import"
|
rm "$import"
|
||||||
echo_warning "cleaned $import"
|
source
|
||||||
|
# echo_warning "cleaned $import"
|
||||||
|
source-script "https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
getDependencies() {
|
getDependencies() {
|
||||||
|
@ -67,13 +69,15 @@
|
||||||
|
|
||||||
cloneSources() {
|
cloneSources() {
|
||||||
cloneDir="$(mktemp -d)"
|
cloneDir="$(mktemp -d)"
|
||||||
echo_pkg git "Cloning $PACKAGE sources at $cloneDir/neovim.."
|
# echo_pkg git "Cloning $PACKAGE sources at $cloneDir/neovim.."
|
||||||
|
|
||||||
cd $cloneDir || mkdir $cloneDir && cd $cloneDir
|
cd $cloneDir || mkdir $cloneDir && cd $cloneDir
|
||||||
|
|
||||||
if command_exists git; then
|
if command_exists git; then
|
||||||
|
spin yellow "Cloning $PACKAGE sources at $cloneDir/neovim.."
|
||||||
if run git clone --depth=1 https://github.com/neovim/neovim.git; then
|
if run git clone --depth=1 https://github.com/neovim/neovim.git; then
|
||||||
cd neovim || echo_error "Cannot navigate into neovim"
|
cd neovim || echo_error "Cannot navigate into neovim"
|
||||||
|
check "Cloned sources"
|
||||||
else
|
else
|
||||||
echo_error "Cannot clone the repo.."
|
echo_error "Cannot clone the repo.."
|
||||||
fi
|
fi
|
||||||
|
@ -85,7 +89,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
makeInstall() {
|
makeInstall() {
|
||||||
echo_pkg build "Compiling neovim from source"
|
# echo_pkg build "Compiling neovim from source"
|
||||||
|
spin "Compiling neovim from source"
|
||||||
if run make CMAKE_BUILD_TYPE=RelWithDebInfo; then
|
if run make CMAKE_BUILD_TYPE=RelWithDebInfo; then
|
||||||
echo_pkg install
|
echo_pkg install
|
||||||
run $_sudo make install
|
run $_sudo make install
|
||||||
|
@ -97,25 +102,32 @@
|
||||||
|
|
||||||
checkAndInitConfig() {
|
checkAndInitConfig() {
|
||||||
if [ -d "$HOME/.config/nvim/" ]; then
|
if [ -d "$HOME/.config/nvim/" ]; then
|
||||||
echo_pkg qol "Prefetching neovim setup configuration.."
|
# echo_pkg qol "Prefetching neovim setup configuration.."
|
||||||
nvim --headless +q
|
spin "Prefetching neovim setup configuration.."
|
||||||
|
if nvim --headless +q; then
|
||||||
|
check "Prefetched config"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo_warning "You don't have a neovim config installed. Do you want to clone one now? [Y]es (standard), [m]inimal, [n]o"
|
# echo_warning "You don't have a neovim config installed. Do you want to clone one now? [Y]es (standard), [m]inimal, [n]o"
|
||||||
read -r askNvim
|
# read -r askNvim
|
||||||
|
choose askNvim "You don't have a neovim config installed. Do you want to clone one now?" "pika's standard config" "pika's minimal config" none
|
||||||
|
|
||||||
case "$askNvim" in
|
case "$askNvim" in
|
||||||
[Yy])
|
"pika's standard config")
|
||||||
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim"
|
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
nvim --headless +q
|
nvim --headless +q
|
||||||
;;
|
;;
|
||||||
[Mm])
|
"pika's minimal config")
|
||||||
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim-mini.git "$HOME/.config/nvim"
|
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim-mini.git "$HOME/.config/nvim"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
nvim --headless +q
|
nvim --headless +q
|
||||||
;;
|
;;
|
||||||
[Nn]) return 0 ;;
|
none) return 0 ;;
|
||||||
*) return 69 ;;
|
*)
|
||||||
|
echo_error "Something failed HARD!"
|
||||||
|
return 69
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue