260615.3 · 98792b1dab553d0ac9a206e40c10643d28cc57f5
*: a near complete overhaul of some fundamental components
Particularly, the `video` script and how Wingo boots. We consolidate much here and avoid separate init scripts for each machine. They were a huge pain to maintain and frequently got out of sync from one another.
We do still have some case analysis, which is annoying. But a foolish consistency is the hobgoblin of little minds.
reading declarations
Changes to bin/relink-ssh-auth-sock. All files
@@ -0,0 +1,32 @@+#!/usr/bin/env bash++set -eu++link="$HOME/.ssh/ssh_auth_sock"++if [[+ -n "${SSH_CONNECTION:-}" &&+ -n "${SSH_AUTH_SOCK:-}" &&+ "$SSH_AUTH_SOCK" != "$link" &&+ -S "$SSH_AUTH_SOCK"+]]; then+ mkdir -p "$HOME/.ssh"+ chmod 700 "$HOME/.ssh"+ ln -snf "$SSH_AUTH_SOCK" "$link"+fi++# When our link isn't valid, try to make it so.+if ! [ -S "$link" ]; then+ for agent in "$HOME/.ssh/agent"/*; do+ if SSH_AUTH_SOCK="$agent" timeout 2s ssh-add -l > /dev/null 2>&1; then+ ln -snf "$agent" "$link"+ break+ fi+ done+fi++if [ -S "$link" ]; then+ printf '%s\n' "$link"+else+ exit 1+fi