diff --git a/dotfiles.sh b/dotfiles.sh index 2058c0d..7aed600 100644 --- a/dotfiles.sh +++ b/dotfiles.sh @@ -1,4 +1,4 @@ -cd ~.dotfiles +cd ~/.dotfiles git pull echo "Creating symbolic links for dotfiles..." @@ -24,7 +24,22 @@ create_symlinks() { echo "Linking directory: $src_dir/.zsh_functions -> $target_zsh_functions" ln -s "$src_dir/.zsh_functions" "$target_zsh_functions" fi - + # Handle .config/alacritty/themes directory specially - link the whole directory + if [ -d "$src_dir/.config/alacritty/themes" ]; then + local target_alacritty_themes="$target_dir/.config/alacritty/themes" + + # Remove existing directory or symlink if it exists + if [ -e "$target_alacritty_themes" ] || [ -L "$target_alacritty_themes" ]; then + echo "Removing existing: $target_alacritty_themes" + rm -rf "$target_alacritty_themes" + fi + + # Create symlink for the entire directory + echo "Linking directory: $src_dir/.config/alacritty/themes -> $target_alacritty_themes" + ln -s "$src_dir/.config/alacritty/themes" "$target_alacritty_themes" + fi + + # Find all files and directories in the source directory, excluding .git, README.md, and .zsh_functions find "$src_dir" \( -not -path "*/\.git*" -and -not -name "README.md" -and -not -path "*/.zsh_functions/*" -and -not -path "*/.zsh_functions" \) -and \( -type f -o -type l \) | while read -r src_file; do # Get the relative path from src_dir