-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile.sh
executable file
·49 lines (45 loc) · 1.2 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
#
#BASE=$(pwd)
#function file_compile {
# stem=$1
# echo "$PWD/$stem"
# source_filename=$stem.tex
# file_verification_text=$(cat "$source_filename.sha1")
# verification_text=$(sha1sum "$source_filename")
# echo "'$verification_text'"
# echo "'$file_verification_text'"
# if [[ ! "$verification_text" == "$file_verification_text" ]]
# then
# echo "'$verification_text'"
# echo "'$file_verification_text'"
# echo file verification fail
# lualatex $stem
# biber $stem
# htlatex "$stem.tex" "$BASE/web" &
# lualatex $stem &
# wait;
# ebook-convert "$stem.html" "$stem.epub"
# # "$BASE/clean.sh"
# echo "$verification_text" > "$source_filename.sha1";
# echo "$source_filename"
# else
# echo "'$verification_text'"
# echo "'$file_verification_text'"
# echo file verification perfect
# fi
#}
#
#file_compile green_buddhism
NAME=green_buddhism
./clean.sh
lualatex $NAME || exit 1
biber $NAME || exit 1
lualatex $NAME || exit 1
htlatex $NAME "web,next" || exit 1
./clean.sh
cp green_buddhism.html index.html
docker build -t green_buddhism . || exit 1
docker tag green_buddhism liberit/green_buddhism:latest
docker push liberit/green_buddhism:latest
echo "done"