testing..

This commit is contained in:
pika 2025-05-22 10:59:47 +02:00
parent 0e6049bf61
commit 8f4f8b2e7c

View file

@ -37,8 +37,8 @@
}
# command for executing silent mode only when nessessairy
# ex: runer "Building $PACKAGE" _install neovim
runer() {
# ex: run "Building $PACKAGE" _install neovim
run() {
local msg=$1
local cmd="${@:1}"
local err out
@ -132,29 +132,34 @@
}
makeInstall() {
local err
line
# echo_pkg build "Compiling neovim from source"
spin "Compiling neovim from source"
if runer make CMAKE_BUILD_TYPE=RelWithDebInfo; then
if run --err err make CMAKE_BUILD_TYPE=RelWithDebInfo; then
check "Compiled $PACKAGE from source"
line
echo_pkg install
$_sudo make install
else
echo_error "Failure while building!"
echo_error "${err:-}"
exit 1
fi
}
checkAndInitConfig() {
local err
line
if [ -d "$HOME/.config/nvim/" ]; then
# echo_pkg qol "Prefetching neovim setup configuration.."
spin "Prefetching neovim setup configuration.."
if runer nvim --headless +q; then
if run --err err nvim --headless +q; then
check "Prefetched config"
else
throw "Prefetching config went terribly wrong!"
echo_error "${err:-}"
fi
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"
@ -166,24 +171,22 @@
# git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git "$HOME/.config/nvim"
# sleep 0.2
local err out
local err
local url="https://git.k4li.de/dotfiles/nvim.git"
spin yellow "Cloning pika's standard config"
# if runer install-stuff; then
if runer git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then
check "Cloned neovim config"
# if run install-stuff; then
if run --err err git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then
line
pen "${out:-}"
check "Cloned neovim config"
else
throw "Clone failed!"
pen "${err:-}"
fi
spin bold yellow "Also sourcing config!"
if runer nvim --headless +q; then
check "Prefetching config was successfull"
if run --err err nvim --headless +q; then
line
pen "${out:-}"
check "Prefetching config was successfull"
else
throw "Prefetching has failed hard!"
pen "${err:-}"
@ -192,22 +195,21 @@
;;
"pika's minimal config")
local url="https://git.k4li.de/dotfiles/nvim-mini.git"
local err
spin yellow "Cloning pika's standard config"
# if runer install-stuff; then
if runer git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then
check "Cloned neovim config"
# if run install-stuff; then
if run --err err git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then
line
pen "${out:-}"
check "Cloned neovim config"
else
throw "Clone failed!"
pen "${err:-}"
fi
spin bold yellow "Also sourcing config!"
if runer nvim --headless +q; then
check "Prefetching config was successfull"
if run --err err nvim --headless +q; then
line
pen "${out:-}"
check "Prefetching config was successfull"
else
throw "Prefetching has failed hard!"
pen "${err:-}"
@ -262,12 +264,6 @@
esac
done
# if $silent; then
# runer="run --err err"
# else
# runer=""
# fi
main </dev/tty
fi