-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·29 lines (28 loc) · 976 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -e
cwd=$(pwd)
echo "Current working dir: $cwd"
tmpdir=$(mktemp -d)
echo "Created temp dir: $tmpdir"
echo "Change to $tmpdir"
cd $tmpdir
echo "$tmpdir: download reveal.js"
wget -q https://github.com/hakimel/reveal.js/archive/master.zip
echo "$tmpdir: download pandoc reveal.js template"
wget -q https://raw.githubusercontent.com/jgm/pandoc-templates/bc7a16b590122a2dc99d1f17f222b72152acc1e7/default.revealjs
echo "$tmpdir: download mathjax3 patch for pandoc reveal.js template"
wget -q https://raw.githubusercontent.com/dajuno/pandoc-revealjs-mathjax/main/mathjax3.patch
echo "$tmpdir: apply patch"
patch -p0 < mathjax3.patch
echo "Change to $cwd"
cd $cwd
echo "Write pandoc reveal.js template to ./template.md"
mv $tmpdir/default.revealjs template.md
echo "Extract reveal.js-master"
unzip $tmpdir/master.zip
echo "Install mathjax3 via node"
npm install mathjax@3
echo "Remove $tmpdir"
rm -r $tmpdir/master.zip $tmpdir/mathjax3.patch
rmdir $tmpdir
echo "Done"