feat: Demo-Examples (Python/Rust/Go/C) mit Protokoll-Templates und Restore-Skript
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fb4e96919a
commit
64c2b7f0fd
21 changed files with 614 additions and 0 deletions
31
examples/restore-all.sh
Executable file
31
examples/restore-all.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
# Stellt den Ausgangszustand aller Examples wieder her.
|
||||
# Löscht erzeugte Sub-Repos, restauriert Quelldateien aus dem Haupt-Repo
|
||||
# und bereinigt Build-Artefakte.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(git -C "$(dirname "$0")" rev-parse --show-toplevel)"
|
||||
EXAMPLES="$ROOT/examples"
|
||||
|
||||
echo "Stelle Examples-Ausgangszustand wieder her..."
|
||||
|
||||
for dir in python-calculator rust-wordcount go-fibonacci c-linkedlist; do
|
||||
path="$EXAMPLES/$dir"
|
||||
if [ -d "$path/.git" ]; then
|
||||
rm -rf "$path/.git"
|
||||
echo " ✓ Sub-Repo entfernt: $dir"
|
||||
fi
|
||||
git -C "$ROOT" checkout -- "examples/$dir/"
|
||||
echo " ✓ Dateien restauriert: $dir"
|
||||
done
|
||||
|
||||
# Build-Artefakte bereinigen
|
||||
rm -rf "$EXAMPLES/rust-wordcount/target"
|
||||
find "$EXAMPLES" -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
||||
find "$EXAMPLES" -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
|
||||
find "$EXAMPLES" -name "ll_demo" -delete 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "Fertig. Alle Examples sind im Ausgangszustand."
|
||||
echo "git status zeigt examples/ als clean (wenn kein PROTOKOLL.md verändert wurde)."
|
||||
Loading…
Add table
Add a link
Reference in a new issue