www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

texcmp.sh (426B)


      1 #!/bin/bash
      2 
      3 set -x
      4 imgname=katex/texcmp
      5 tag=1.1
      6 imgid=$(docker images | awk "/${imgname//\//\\/} *${tag//./\\.}/{print \$3}")
      7 cd "$(dirname "$0")" || exit $?
      8 npm install || exit $?
      9 if [[ -z ${imgid} ]]; then
     10     docker build -t "${imgname}:${tag}" . || exit $?
     11 fi
     12 base=$(cd ../..; pwd)
     13 docker run --rm \
     14        -v "${base}":/KaTeX \
     15        -w /KaTeX/dockers/texcmp \
     16        "${imgname}:${tag}" \
     17        nodejs texcmp.js "$@"