Files
dotfiles/install.d/20-ssh.sh
Andrejus b62a6c00f9 chore(install): optimize logging, speed, cleanup
- Version logged after [PASS] (not before) across all scripts
- Pre-cache brew package lists with log_info progress
- Read brew version from git describe cache (skip Ruby startup)
- Batch mise use -g calls (single invocation for all tools)
- Replace mise verify step with mise ls --current
- Parallel vim plugin pulls
- Skip donut compile when binary is fresh
- Pre-check macOS defaults before writing (skip fsync when unchanged)
- Pre-check dock state before dockutil calls
- Remove redundant 'already installed' skip logs
- Remove meetingbar and wispr-flow install scripts
- Renumber scripts to fill gaps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 18:09:38 +00:00

30 lines
728 B
Bash
Executable File

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Print SSH key.
#
# Skip in Codespaces (managed by GitHub)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_skip "Codespaces"; return 0; }
# Skip if explicitly disabled
[[ -n "$SKIP_SSH_CONFIG" ]] && { log_skip "SKIP_SSH_CONFIG is set"; return 0; }
ssh_method="ed25519"
ssh_target="${HOME}/.ssh"
ssh_key="${ssh_target}/id_${ssh_method}"
ssh_pub="${ssh_key}.pub"
if [ ! -f "$ssh_key" ]; then
ssh-keygen \
-t "$ssh_method" \
-f "$ssh_key" \
-C "$(whoami)@$(hostname)-$(date -I)"
fi
log_pass "SSH key configured"
cat "$ssh_pub" | log_quote
unset ssh_method ssh_target ssh_key ssh_pub