Add sync-dotfiles-remote.sh script
One-liner to sync dotfiles to remote machines without chezmoi: - Creates archive with chezmoi archive - SCPs to remote - Extracts to home directory - Installs Claude plugins if CLI available
This commit is contained in:
parent
0601f71b66
commit
b398cc665b
1 changed files with 18 additions and 0 deletions
18
dot_local/bin/executable_sync-dotfiles-remote.sh
Normal file
18
dot_local/bin/executable_sync-dotfiles-remote.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Sync dotfiles to remote machine without chezmoi
|
||||||
|
# Usage: ./sync-dotfiles-remote.sh user@host
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
REMOTE="${1:?Usage: $0 user@host}"
|
||||||
|
|
||||||
|
echo "Creating dotfiles archive..."
|
||||||
|
chezmoi archive --output=/tmp/dotfiles.tar.gz
|
||||||
|
|
||||||
|
echo "Copying to $REMOTE..."
|
||||||
|
scp /tmp/dotfiles.tar.gz "$REMOTE":/tmp/
|
||||||
|
|
||||||
|
echo "Extracting and setting up Claude plugins..."
|
||||||
|
ssh "$REMOTE" 'cd ~ && tar -xzf /tmp/dotfiles.tar.gz && rm /tmp/dotfiles.tar.gz && if command -v claude &>/dev/null; then claude /add-marketplace anthropics/claude-plugins-official 2>/dev/null || true; claude /add-marketplace anthropics/skills 2>/dev/null || true; claude /add-marketplace obra/superpowers-marketplace 2>/dev/null || true; claude /install-plugin code-simplifier@claude-plugins-official 2>/dev/null || true; claude /install-plugin ralph-loop@claude-plugins-official 2>/dev/null || true; claude /install-plugin superpowers@claude-plugins-official 2>/dev/null || true; echo "Claude plugins installed"; else echo "Claude CLI not found, skipping plugins"; fi'
|
||||||
|
|
||||||
|
echo "Done!"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue