refactor: Update installer scripts to make use of rollback hooks and exec tracking

This commit is contained in:
2026-06-24 22:04:30 +05:30
parent b31a326ca1
commit 368dea1bbd
12 changed files with 22 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ install_packages() {
log_info "Installing tree-sitter-cli globally..."
sudo npm install -g tree-sitter-cli
add_rollback_cmd "sudo npm uninstall -g tree-sitter-cli"
}
install_nvim() {
@@ -86,6 +87,9 @@ install_nvim() {
sudo mv "$TMP_DIR/nvim-${nvim_arch}" "$NVIM_INSTALL_DIR"
sudo ln -sf "$NVIM_INSTALL_DIR/bin/nvim" /usr/local/bin/nvim
track_dir "$NVIM_INSTALL_DIR"
track_file "/usr/local/bin/nvim"
log_success "Installed:"
nvim --version | head -n1
@@ -102,6 +106,7 @@ install_config() {
log_info "Cloning configuration to $NVIM_CONFIG_DIR..."
git clone "$NVIM_CONFIG_REPO" "$NVIM_CONFIG_DIR"
track_dir "$NVIM_CONFIG_DIR"
log_success "Configuration installed."
}