-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·37 lines (29 loc) · 1.26 KB
/
install.sh
File metadata and controls
executable file
·37 lines (29 loc) · 1.26 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
#!/usr/bin/env bash
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
shell_addition() {
rcfile=$1
add_file=$2
marker="# Dotfile addition - ${add_file}"
if [ ! -f "$rcfile" ]; then
touch "$rcfile"
echo "Created ${rcfile}"
fi
if ! grep -q "$marker" "$rcfile"; then
echo "" >> "$rcfile"
echo "$marker" >> "$rcfile"
echo "if [ -f \"$add_file\" ]; then source \"$add_file\"; fi" >> "$rcfile"
fi
}
# Basic dotfile links
ln -sf "${DOTFILES_DIR}/.gitconfig" "${HOME}/.gitconfig"
ln -sf "${DOTFILES_DIR}/.vimrc" "${HOME}/.vimrc"
ln -sf "${DOTFILES_DIR}/.tmux.conf" "${HOME}/.tmux.conf"
mkdir -p ${HOME}/.config/zellij && ln -sf "${DOTFILES_DIR}/.config/zellij/config.kdl" "${HOME}/.config/zellij/config.kdl"
mkdir -p ${HOME}/.config/ghostty && ln -sf "${DOTFILES_DIR}/.config/ghostty/config" "${HOME}/.config/ghostty/config"
mkdir -p ${HOME}/.claude
ln -sf "${DOTFILES_DIR}/.claude/settings.json" "${HOME}/.claude/settings.json"
mkdir -p ${HOME}/.pi/agent
ln -sf "${DOTFILES_DIR}/.pi/agent/APPEND_SYSTEM.md" "${HOME}/.pi/agent/APPEND_SYSTEM.md"
# Add things to shell rc files
shell_addition "${HOME}/.bashrc" "${DOTFILES_DIR}/.bashrc_additions"
shell_addition "${HOME}/.zshrc" "${DOTFILES_DIR}/.zshrc_additions"