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