testing also the new beautiful script

This commit is contained in:
pika 2025-05-21 22:32:48 +02:00
parent ec07cdd578
commit 16ffd85d42

43
rofi.sh
View file

@ -19,12 +19,12 @@
# This only wokrs for generic package names, like neovim, or vim, or tmux etc.. # 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.. # not every package packagemanager has the same packagenames for their packages..
getImports() { getImports() {
local url="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" local url="$1"
local import="$(mktemp)" local import="$(mktemp)"
if command_exists curl; then if command_exists curl; then
curl -fsSL $url -o $import curl -fsSL $url -o $import
elif command_exists wget; then elif command_exists wget; then
wget -o $import $url wget -O $import $url
else else
echo "curl/wget is required, but missing.." echo "curl/wget is required, but missing.."
exit 69 exit 69
@ -36,7 +36,8 @@
} }
getDependencies() { getDependencies() {
echo_info "Checking build dependencies.." local err
# echo_info "Checking build dependencies.."
# INFO: # INFO:
# ╭─────────────────────────────────────────────────────────────────────────╮ # ╭─────────────────────────────────────────────────────────────────────────╮
@ -66,8 +67,13 @@
case "$distro" in case "$distro" in
debian | ubuntu | arch | fedora | alpine | opensuse) debian | ubuntu | arch | fedora | alpine | opensuse)
echo_info "Installing missing dependencies.." # echo_info "Installing missing dependencies.."
checkAndInstall "${pkgArray[@]}" spin "Instaling missing dependencies.."
if run -err err checkAndInstall "${pkgArray[@]}"; then
check "Installed dependencies $(pen blue ${pkgArray[@]}) correctly"
else
throw "$err"
fi
;; ;;
*) *)
echo_error "Cannot install for $distro" echo_error "Cannot install for $distro"
@ -78,9 +84,15 @@
rofi_clone_and_build() { rofi_clone_and_build() {
local rofiTemp="$(mktemp -d)" local rofiTemp="$(mktemp -d)"
echo_pkg clone "Cloning rofi to $rofiTemp/rofi" local err
# echo_pkg clone "Cloning rofi to $rofiTemp/rofi"
spin yellow "Cloning $(pen red $PACKAGE) into $rofiTemp/$PACKAGE"
git clone --depth=1 https://github.com/A417ya/rofi-wayland "$rofiTemp/rofi" if run --err err git clone --depth=1 https://github.com/A417ya/rofi-wayland "$rofiTemp/rofi"; then
check green "Cloned $PACKAGE"
else
throw "$out"
fi
sleep 0.2 sleep 0.2
@ -91,14 +103,21 @@
echo_pkg build echo_pkg build
run meson setup build spin
if run --err err1 meson setup build; then
run ninja -C build if run --err err2 ninja -C build; then
check "Build $PACKAGE complete"
else
throw "$err2"
fi
else
throw "$err1"
fi
echo_pkg install echo_pkg install
ninja -C build install ninja -C build install
echo_note "Cleaning up old $rofiTemp directory.." pen grey "Cleaning up old $rofiTemp directory.."
rm -rf $rofiTemp rm -rf $rofiTemp
} }
@ -119,7 +138,7 @@
esac esac
} }
if getImports; then if getImports "https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh" && getImports "https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"; then
# ─< package variable >─────────────────────────────────────────────────────────────────── # ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE unset PACKAGE