mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 873656c72abc9941b97beb2a585898b9d0f2468b
parent 6c3cb43cf2e4d76d9282e857bbf5fbce5f620262
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Tue,  1 Mar 2016 23:16:44 +0100

start container, do not run image; fix url

Diffstat:
addmathjax | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/addmathjax b/addmathjax @@ -2,11 +2,13 @@ TEMP=$(mktemp) -# a3nm-mathjax-testing following a base debian image and included config -if ! docker ps | grep '\sa3nm-mathjax-testing$' > /dev/null +# a3nm-mathjax-testing follows a base debian image and included config +# and a container must have been created with +# sudo docker run -di --name=a3nm-mathjax-testing \ +# a3nm-mathjax-testing bash +if ! sudo docker ps | grep '\sa3nm-mathjax-testing$' > /dev/null then - sudo docker run -di --name=a3nm-mathjax-testing \ - a3nm-mathjax-testing bash >/dev/null || { + sudo docker start a3nm-mathjax-testing >/dev/null || { echo "cannot start the mathjax container" >&2; exit 3; } fi @@ -18,7 +20,7 @@ then # expensive processing TEMP2=$(mktemp) sudo docker exec -i a3nm-mathjax-testing node_modules/mathjax-node/bin/page2html \ - --fontURL "https://mathjax.a3nm.net/fonts/HTML-CSS" <$TEMP >$TEMP2 || \ + --fontURL "https://a3nm.net/mathjax/fonts/HTML-CSS" <$TEMP >$TEMP2 || \ { echo "cannot run mathjax" >&2; exit 2;} sed 's,<style id="MathJax_CHTML_styles">undefined</style>,,g' "$TEMP2" | sed 's,<span class="mjx-char"></span>,,g'