-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile.sh
32 lines (25 loc) · 922 Bytes
/
compile.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
30
31
32
#!/bin/bash
set -e
set -x
REVEALJSVERSION="4.5.0"
STARTFOLDER=${PWD}
REVEALJSTAR="./revealjs.tar.gz"
if [[ ! -d "./reveal.js" ]]; then
wget "https://github.com/hakimel/reveal.js/tarball/$REVEALJSVERSION" --output-document="$REVEALJSTAR"
tar -xf "$REVEALJSTAR"
rm "$REVEALJSTAR"
REVEALJSEXTRACTED=$(ls -1 | grep hakimel-reveal.js)
mv "$REVEALJSEXTRACTED" reveal.js
if [[ -d "./node_modules" ]]; then
mv node_modules reveal.js
else
cd reveal.js
npm install
npm install gulp-cli
fi
fi
cd "${STARTFOLDER}"/reveal.js
ln -fs "${PWD}"/../src/css/theme/source/* ./css/theme/source/ # add our theme to reveal.js
npm run build -- css-themes # build all reveal.js themes, including ours
cd "${STARTFOLDER}"
mv reveal.js/node_modules . # remove node_modules from reveal (to not overload gitlab)