style: normalize whitespace and line endings in shell scripts

- Standardize indentation and spacing across install.sh and lib files
- Fix line ending inconsistencies for better cross-platform compatibility
- Improve curl flag usage in neovim.sh (-kLo with explicit temp path)
- Add theme persistence functionality to remember user's colorscheme choice

These changes improve code consistency and add the ability to save/restore
the selected theme across sessions.
This commit is contained in:
marvin.dietermann
2026-04-10 12:46:48 +02:00
parent d5f57a3511
commit fbc1e60afc
4 changed files with 59 additions and 10 deletions

View File

@@ -53,12 +53,17 @@ sudo -v || error "Failed to obtain sudo. Aborting."
( while kill -0 $$ 2>/dev/null; do sudo -n true; sleep 50; done ) &
SUDO_KEEPALIVE_PID=$!
INSTALL_SUCCESS=false
cleanup() {
local exit_code=$?
kill $SUDO_KEEPALIVE_PID 2>/dev/null
if ! $VERBOSE && [[ -e /proc/self/fd/3 ]]; then
exec 1>&3 2>&4 3>&- 4>&-
echo ""
echo -e " ${RED}[✗]${NC} Installation failed. See log: $LOG_FILE"
if ! $INSTALL_SUCCESS; then
echo ""
echo -e " ${RED}[✗]${NC} Installation failed (exit $exit_code). See log: $LOG_FILE"
fi
fi
}
trap cleanup EXIT
@@ -84,6 +89,8 @@ if ! $VERBOSE; then
end_quiet_mode
fi
INSTALL_SUCCESS=true
# ── Done ────────────────────────────────────────────────────────
echo ""
echo " ╔═══════════════════════════════════════╗"