Fix plugin paths for remote home directory
- Replaces local home path with remote user's home path - Uses sed to fix installed_plugins.json after extraction
This commit is contained in:
parent
9e678b2dfa
commit
90ff0864ab
1 changed files with 6 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
set -e
|
||||
|
||||
REMOTE="${1:?Usage: $0 user@host}"
|
||||
LOCAL_HOME="$HOME"
|
||||
|
||||
echo "Creating dotfiles archive..."
|
||||
chezmoi archive --output=/tmp/dotfiles.tar.gz
|
||||
|
|
@ -21,4 +22,9 @@ ssh "$REMOTE" 'cd ~ && tar -xzf /tmp/dotfiles.tar.gz && rm /tmp/dotfiles.tar.gz'
|
|||
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'
|
||||
|
||||
echo "Fixing plugin paths for remote home directory..."
|
||||
ssh "$REMOTE" "sed -i.bak 's|$LOCAL_HOME|\$HOME|g' ~/.claude/plugins/installed_plugins.json && rm -f ~/.claude/plugins/installed_plugins.json.bak"
|
||||
# Expand $HOME on remote
|
||||
ssh "$REMOTE" 'sed -i.bak "s|\$HOME|$HOME|g" ~/.claude/plugins/installed_plugins.json && rm -f ~/.claude/plugins/installed_plugins.json.bak'
|
||||
|
||||
echo "Done! Dotfiles and Claude marketplaces synced to $REMOTE"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue