#!/usr/bin/env bash set -e PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" DOTFILES_DIR="$PROJECT_DIR/dotfiles" echo "==> Installiere Dotfiles..." mkdir -p "$HOME/.config" if command -v rsync >/dev/null 2>&1; then rsync -a "$DOTFILES_DIR/.bashrc" "$HOME/" 2>/dev/null || true rsync -a "$DOTFILES_DIR/.gitconfig" "$HOME/" 2>/dev/null || true rsync -a "$DOTFILES_DIR/.tmux.conf" "$HOME/" 2>/dev/null || true if [ -d "$DOTFILES_DIR/.config" ]; then rsync -a --delete "$DOTFILES_DIR/.config/" "$HOME/.config/" fi else cp -f "$DOTFILES_DIR/.bashrc" "$HOME/" 2>/dev/null || true cp -f "$DOTFILES_DIR/.gitconfig" "$HOME/" 2>/dev/null || true cp -f "$DOTFILES_DIR/.tmux.conf" "$HOME/" 2>/dev/null || true if [ -d "$DOTFILES_DIR/.config" ]; then cp -a "$DOTFILES_DIR/.config/." "$HOME/.config/" fi fi echo "==> Dotfiles erfolgreich installiert."