Copy files instead of sysmlinking fix

This commit is contained in:
2026-01-25 11:47:52 +01:00
parent 84dc253f2b
commit c9f40358ad

View File

@@ -168,11 +168,28 @@ if [ -f "$ZSHRC" ] && [ ! -L "$ZSHRC" ]; then
fi fi
# ==================== # ====================
# Symlinks # Copy or Symlink files
# ==================== # ====================
log_info "Creating zsh config directory" log_info "Creating zsh config directory"
run "mkdir -p '$ZSH_DIR'" run "mkdir -p '$ZSH_DIR'"
if $CLEANUP_DOTFILES; then
# Running from curl - copy files instead of symlinking
log_info "Copying zsh config files"
run "cp '$DOTFILES_DIR/zsh/zshrc' '$ZSHRC'"
run "cp '$DOTFILES_DIR/zsh/keybindings.zsh' '$ZSH_DIR/keybindings.zsh'"
run "cp '$DOTFILES_DIR/zsh/history.zsh' '$ZSH_DIR/history.zsh'"
run "cp '$DOTFILES_DIR/zsh/fzf.zsh' '$ZSH_DIR/fzf.zsh'"
run "cp '$DOTFILES_DIR/zsh/plugins.zsh' '$ZSH_DIR/plugins.zsh'"
if $ADD_NVM; then
log_info "Copying NVM config"
run "cp '$DOTFILES_DIR/zsh/nvm.zsh' '$ZSH_DIR/nvm.zsh'"
else
run "rm -f '$ZSH_DIR/nvm.zsh' || true"
fi
else
# Running from cloned repo - use symlinks for easier updates
log_info "Linking zsh config files" log_info "Linking zsh config files"
run "ln -sf '$DOTFILES_DIR/zsh/zshrc' '$ZSHRC'" run "ln -sf '$DOTFILES_DIR/zsh/zshrc' '$ZSHRC'"
run "ln -sf '$DOTFILES_DIR/zsh/keybindings.zsh' '$ZSH_DIR/keybindings.zsh'" run "ln -sf '$DOTFILES_DIR/zsh/keybindings.zsh' '$ZSH_DIR/keybindings.zsh'"
@@ -186,6 +203,7 @@ if $ADD_NVM; then
else else
run "rm -f '$ZSH_DIR/nvm.zsh' || true" run "rm -f '$ZSH_DIR/nvm.zsh' || true"
fi fi
fi
# ==================== # ====================
# Theme handling # Theme handling