#!/bin/bash
echo "=== ERRORS in build log ==="
grep -iE "error:|FAILED|fatal" ~/pytorch-build-progress.log 2>/dev/null | grep -v "Warnung" | grep -v "Anmerkung" | grep -v "error=return" | grep -v "error=non-virtual" | grep -v "error=range" | grep -v "error=bool" | grep -v "error=format" | grep -v "Werror" | grep -v "error=missing" | tail -30

echo ""
echo "=== LAST 5 LINES of build.log ==="
tail -5 ~/pytorch-build.log

echo ""
echo "=== BUILD DIR SIZE ==="
du -sh ~/pytorch-build/build 2>/dev/null

echo ""
echo "=== WHEEL CHECK ==="
ls ~/pytorch-build/dist/*.whl 2>/dev/null || echo "No wheel"
