#! /bin/sh -
#
# This file is licensed under the MIT No Attribution license.
#

set -e || exit $?
. ./prelude.bash

main() {

  rm -f -r repo
  git clone \
    --depth 1 \
    -b 3.1.2 \
    https://github.com/mathjax/MathJax.git \
    repo \
  ;
  cd repo
  git checkout c8292351190ce249f7143f224dbe7a190c8228fe
  cd es5
  for x in ./*; do
    rm -f -r "../../${x##*/}"
    mv -f "$x" ../..
  done
  cd ../..
  rm -f -r repo

}; readonly -f main

main "$@"
