2026-02-03 20:31:13 +00:00
|
|
|
#!/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
|
|
|
|
|
|
2026-02-03 20:39:04 +00:00
|
|
|
echo "Creating Claude marketplaces archive..."
|
|
|
|
|
tar -czf /tmp/claude-marketplaces.tar.gz -C ~/.claude/plugins marketplaces
|
|
|
|
|
|
2026-02-03 20:31:13 +00:00
|
|
|
echo "Copying to $REMOTE..."
|
2026-02-03 20:39:04 +00:00
|
|
|
scp /tmp/dotfiles.tar.gz /tmp/claude-marketplaces.tar.gz "$REMOTE":/tmp/
|
|
|
|
|
|
|
|
|
|
echo "Extracting dotfiles..."
|
|
|
|
|
ssh "$REMOTE" 'cd ~ && tar -xzf /tmp/dotfiles.tar.gz && rm /tmp/dotfiles.tar.gz'
|
2026-02-03 20:31:13 +00:00
|
|
|
|
2026-02-03 20:39:04 +00:00
|
|
|
echo "Extracting Claude marketplaces..."
|
|
|
|
|
ssh "$REMOTE" 'mkdir -p ~/.claude/plugins && tar -xzf /tmp/claude-marketplaces.tar.gz -C ~/.claude/plugins && rm /tmp/claude-marketplaces.tar.gz'
|
2026-02-03 20:31:13 +00:00
|
|
|
|
2026-02-03 20:39:04 +00:00
|
|
|
echo "Done! Dotfiles and Claude marketplaces synced to $REMOTE"
|