File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,3 +92,41 @@ install_zoxide() {
9292 sudo mv " $HOME /.local/bin/zoxide" /usr/local/bin/zoxide
9393 log_ok zoxide
9494}
95+
96+ # ============================================
97+ # Step 6 — Deploy Dotfiles
98+ # ============================================
99+ deploy_dotfiles () {
100+ should_skip dotfiles && { log_skip dotfiles; return ; }
101+ cd " $HOME /.dotfiles"
102+ stow .
103+ log_ok dotfiles
104+ }
105+
106+ # ============================================
107+ # Step 7 — Linux Compat Patches
108+ # ============================================
109+ patch_linux_compat () {
110+ should_skip patch && { log_skip patch; return ; }
111+ local fish_cfg=" $HOME /.config/fish/config.fish"
112+ local tmux_cfg=" $HOME /.config/tmux/tmux.conf"
113+
114+ # Patch 1: make brew sourcing a no-op when brew is absent
115+ if grep -q ' /opt/homebrew/bin/brew shellenv | source' " $fish_cfg " ; then
116+ sed -i ' s@/opt/homebrew/bin/brew shellenv | source@command -q brew; and brew shellenv | source@' " $fish_cfg "
117+ fi
118+
119+ # Patch 2: strip macOS-only PATH entries
120+ sed -i ' /lm-studio\/bin/d; /\.opencode\/bin/d; /\.agent-view\/bin/d' " $fish_cfg "
121+
122+ # Patch 3: fix tmux fish path (Homebrew → system)
123+ if grep -q ' /opt/homebrew/bin/fish' " $tmux_cfg " ; then
124+ sed -i ' s@/opt/homebrew/bin/fish@/usr/bin/fish@g' " $tmux_cfg "
125+ fi
126+
127+ echo " "
128+ echo " WARNING: patch_linux_compat modified files inside ~/.dotfiles via stow symlinks."
129+ echo " Do NOT commit these changes — they would break the macOS config."
130+ echo " Run: git -C ~/.dotfiles diff"
131+ log_ok patch
132+ }
You can’t perform that action at this time.
0 commit comments