-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·43 lines (35 loc) · 1.76 KB
/
setup.sh
File metadata and controls
executable file
·43 lines (35 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Setting up dotfiles from $DOTFILES_DIR"
create_symlink() {
local source="$1"
local target="$2"
if [ -e "$target" ] || [ -L "$target" ]; then
if [ -L "$target" ] && [ "$(readlink "$target")" = "$source" ]; then
echo "$target is already linked"
return
fi
echo "Backing up existing $target to ${target}.backup"
mv "$target" "${target}.backup"
fi
ln -s "$source" "$target"
echo "Created symlink: $target -> $source"
}
create_symlink "$DOTFILES_DIR/.zshrc" "$HOME/.zshrc"
create_symlink "$DOTFILES_DIR/vscode/settings.json" "$HOME/Library/Application Support/Code/User/settings.json"
create_symlink "$DOTFILES_DIR/nvim" "$HOME/.config/nvim"
create_symlink "$DOTFILES_DIR/karabiner/karabiner.json" "$HOME/.config/karabiner/karabiner.json"
create_symlink "$DOTFILES_DIR/claude/settings.json" "$HOME/.claude/settings.json"
create_symlink "$DOTFILES_DIR/claude/CLAUDE.md" "$HOME/.claude/CLAUDE.md"
create_symlink "$DOTFILES_DIR/claude/skills/commit-edited" "$HOME/.claude/skills/commit-edited"
create_symlink "$DOTFILES_DIR/claude/skills/fix-gh-ci-error" "$HOME/.claude/skills/fix-gh-ci-error"
create_symlink "$DOTFILES_DIR/.tmux.conf" "$HOME/.tmux.conf"
create_symlink "$DOTFILES_DIR/mise_config.toml" "$HOME/.config/mise/config.toml"
create_symlink "$DOTFILES_DIR/lazygit/config.yml" "$HOME/Library/Application Support/lazygit/config.yml"
echo ""
echo "Done! Dotfiles setup complete."
echo ""
echo "=== Claude Code Plugin Setup ==="
echo "Claude Code を起動して以下を実行してください:"
echo " /plugin add $DOTFILES_DIR/claude-marketplace"
echo "auto-update を有効にすると、変更が自動で同期されます。"