-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·45 lines (38 loc) · 1.7 KB
/
install.sh
File metadata and controls
executable file
·45 lines (38 loc) · 1.7 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
44
45
#!/bin/bash
mkdir -p ~/.config
mkdir -p ~/.claude
mkdir -p ~/.codex
is_linux=$(uname -s | grep -iq linux && echo 1 || echo 0)
# Link all config and script files to their expected locations.
for localdir in ".local" ".config"; do
dirpath=$(readlink -f $localdir)
ln -sfF $dirpath/* $HOME/$localdir
done
# symlink the global claude dir to ~/.claude. Need distinguishing name (claude_global) because `.claude/` in dotfiles repo is interpreted as repo-specific claude settings.
ln -sfF $(readlink -f claude_global)/* ${HOME}/.claude
# Link repo-managed Codex globals without replacing Codex runtime state or system skills.
ln -sfF "$(readlink -f codex_global/AGENTS.md)" "${HOME}/.codex/AGENTS.md"
mkdir -p "${HOME}/.codex/skills"
for skilldir in codex_global/skills/*/; do
[ -d "$skilldir" ] || continue
skillname=$(basename "$skilldir")
skilltarget="${HOME}/.codex/skills/${skillname}"
if [ -d "$skilltarget" ] && [ ! -L "$skilltarget" ]; then
echo "Refusing to replace existing Codex skill directory: $skilltarget" >&2
continue
fi
ln -snf "$(readlink -f "$skilldir")" "$skilltarget"
done
for localfile in ".commonrc" ".vimrc" ".bashrc" ".zshrc" ".profile" ".zprofile" ".stylua.toml" ".rg" ".ipython/profile_default/ipython_config.py" ".slurm_fns.sh" ".lsf_fns.sh"; do
filepath=$(readlink -f $localfile)
ln -sfF $filepath $HOME/$localfile
done
# gitstack: symlink script (alias is in .config/git/config, installed above)
mkdir -p "$HOME/.local/share"
ln -sf "$(cd gitstack && pwd)/gitstack.py" "$HOME/.local/share/gitstack.py"
vscode_settings=$(readlink -f settings.json)
if [ $is_linux -eq 1 ]; then
echo "linux"
else
ln -sfF $vscode_settings "$HOME/Library/Application Support/Code/User/settings.json"
fi