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:
11
install.sh
11
install.sh
@@ -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 " ╔═══════════════════════════════════════╗"
|
||||
|
||||
Reference in New Issue
Block a user