setup.sh 921 B

1234567891011121314
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. G="\033[0;32m"; R="\033[0;31m"; N="\033[0m"
  4. ok() { echo -e " ${G}+${N} $1"; }
  5. fail() { echo -e " ${R}x${N} $1"; }
  6. echo ""; echo "Manim Video Skill — Setup Check"; echo ""
  7. errors=0
  8. command -v python3 &>/dev/null && ok "Python $(python3 --version 2>&1 | awk '{print $2}')" || { fail "Python 3 not found"; errors=$((errors+1)); }
  9. python3 -c "import manim" 2>/dev/null && ok "Manim $(manim --version 2>&1 | head -1)" || { fail "Manim not installed: pip install manim"; errors=$((errors+1)); }
  10. command -v pdflatex &>/dev/null && ok "LaTeX (pdflatex)" || { fail "LaTeX not found (macOS: brew install --cask mactex-no-gui)"; errors=$((errors+1)); }
  11. command -v ffmpeg &>/dev/null && ok "ffmpeg" || { fail "ffmpeg not found"; errors=$((errors+1)); }
  12. echo ""
  13. [ $errors -eq 0 ] && echo -e "${G}All prerequisites satisfied.${N}" || echo -e "${R}$errors prerequisite(s) missing.${N}"
  14. echo ""