#!/bin/bash # Install job-search knowledge into Claude Code project directories # Run this on any new machine after cloning the repo REPO_DIR="$(cd "$(dirname "$0")" && pwd)" # Matthias's Claude project memory directory MATTHIAS_PROJECT="$HOME/.claude/projects/-Users-i052341-Daten-Cloud-09---Job-Search/memory" # Gina's Claude project memory directory GRAZYNA_PROJECT="$HOME/.claude/projects/-Users-i052341-Daten-Cloud-04---Ablage-Ablage-2020---2029-Grazyna-Arbeit-Jobs-Grazyna/memory" # Global Jobs skill directory SKILL_DIR="$HOME/.claude/Skills/user/Jobs" echo "Job Search Knowledge - Install Script" echo "======================================" echo "Repo: $REPO_DIR" echo "" # Backup existing files if they exist and aren't already symlinks backup_if_needed() { local target="$1" if [ -e "$target" ] && [ ! -L "$target" ]; then local backup="${target}.backup.$(date +%Y%m%d%H%M%S)" echo " Backing up existing: $target -> $backup" mv "$target" "$backup" fi } # Create symlink create_link() { local source="$1" local target="$2" if [ -L "$target" ]; then echo " Already linked: $target" return fi backup_if_needed "$target" mkdir -p "$(dirname "$target")" ln -s "$source" "$target" echo " Linked: $target -> $source" } echo "1. Linking Matthias's memory files..." if [ -d "$MATTHIAS_PROJECT" ] || mkdir -p "$MATTHIAS_PROJECT"; then for f in "$REPO_DIR/matthias/memory/"*; do fname=$(basename "$f") create_link "$f" "$MATTHIAS_PROJECT/$fname" done fi echo "" echo "2. Linking Gina's memory files..." if [ -d "$GRAZYNA_PROJECT" ] || mkdir -p "$GRAZYNA_PROJECT"; then for f in "$REPO_DIR/grazyna/memory/"*; do fname=$(basename "$f") create_link "$f" "$GRAZYNA_PROJECT/$fname" done fi echo "" echo "3. Linking Jobs skill..." if [ -d "$SKILL_DIR" ] || mkdir -p "$SKILL_DIR"; then # Link SKILL.md create_link "$REPO_DIR/workflows/SKILL.md" "$SKILL_DIR/SKILL.md" # Link workflows directory mkdir -p "$SKILL_DIR/workflows" for f in "$REPO_DIR/workflows/"*.md; do fname=$(basename "$f") [ "$fname" = "SKILL.md" ] && continue create_link "$f" "$SKILL_DIR/workflows/$fname" done fi echo "" echo "Done! Job search knowledge is now linked into Claude Code." echo "" echo "Working directories (outputs go here, not in this repo):" echo " Matthias: ~/Daten/Cloud/09 - Job Search/Notes/" echo " Gina: ~/Daten/Cloud/04 - Ablage/.../Jobs Grazyna/Notes/"