testing new syntax.. kinda..

This commit is contained in:
pika 2025-05-23 16:49:33 +02:00
parent 85e35d9ea0
commit 39277705e5

View file

@ -69,18 +69,18 @@
debian | ubuntu | arch | fedora | alpine | opensuse) debian | ubuntu | arch | fedora | alpine | opensuse)
for pkg in "${pkgArray[@]}"; do for pkg in "${pkgArray[@]}"; do
if ! command_exists $pkg; then if ! command_exists $pkg; then
spin bold "Installing $pkg" spin bold "$(pen bold yellow Installing) $pkg"
run --err err pkg-install $pkg && check "$pkg $(pen green installed)!" || run --err err pkg-install $pkg && check "$(pen bold green Installed) $pkg" ||
throw "Something went wrong! Could not install $(pen bold red $pkg)" && throw "Something went wrong! Could not install $(pen bold red $pkg)" &&
throw "${err:-}" echo_error "${err:-}"
else else
check "$pkg $(pen green bold 'already installed')" check "$pkg $(pen green already installed)"
fi fi
done done
;; ;;
*) *)
echo_error "Cannot install for $distro" echo_error "Cannot install for $distro"
exit 1 exit 69
;; ;;
esac esac
} }
@ -88,8 +88,6 @@
cloneSources() { cloneSources() {
local err local err
cloneDir="$(mktemp -d)" cloneDir="$(mktemp -d)"
# echo_pkg git "Cloning $PACKAGE sources at $cloneDir/neovim.."
cd $cloneDir || mkdir $cloneDir && cd $cloneDir cd $cloneDir || mkdir $cloneDir && cd $cloneDir
line line
@ -113,7 +111,7 @@
line line
# echo_pkg install # echo_pkg install
spin "Installing $PACKAGE" spin bold "Installing $PACKAGE"
if run --err err $_sudo make install; then if run --err err $_sudo make install; then
check "$PACKAGE installed!" check "$PACKAGE installed!"
else else
@ -176,7 +174,7 @@
none) exit 0 ;; none) exit 0 ;;
own) own)
local url err local url err
seek url "What is the url for your neovim config?" seek url "What is the url for your neovim config?" </dev/tty
spin yellow "Cloning your config!" spin yellow "Cloning your config!"
if run --err err git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then if run --err err git clone --recursive --depth=1 $url "$HOME/.config/nvim"; then