update.sh 552 B

123456789101112131415161718
  1. #!/bin/bash
  2. mkdir -p public build integrals
  3. if [ ! -e public/index.html ]; then
  4. ln -s "../iotd.html" "public/index.html"
  5. fi
  6. (if [ `wc -l integrals/input | awk '{print $1}'` -le "5" ] && hash telelog 2>/dev/null; then
  7. telelog "Running out of integrals!"
  8. fi) &
  9. if [ ! -s "integrals/input" ]; then exit 1; fi
  10. head -n1 "integrals/input" | tee "equation.tex" | tee -a "integrals/used"
  11. sed -i '1d' "integrals/input"
  12. latex -output-directory=build template.tex
  13. dvisvgm -e --no-fonts build/template.dvi
  14. mv template.svg public/int.svg
  15. rm equation.tex