summaryrefslogtreecommitdiff
path: root/install_prepare.sh
blob: 0fa736c75af3f91efda82bb3668f9e830c89ec2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
set -xeuo pipefail

abbrgen_execname="modules/abbrgen/abbreviation_gen_`uname`"
test -f "$abbrgen_execname" || \
	g++ -Wall -Wextra -std=c++11 -O3 -o "$abbrgen_execname" modules/abbrgen/abbreviation_gen.cpp

test -f modules/unicode/UnicodeData.txt || \
	curl -Ls 'https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt' >modules/unicode/UnicodeData.txt

mkdir -p static/fonts
test -f static/fonts/mononoki-Regular.woff || {
	tmpdir=$(mktemp -d)
	trap "rm -rf '$tmpdir'" EXIT
	wget 'https://github.com/madmalik/mononoki/releases/download/1.2/mononoki.zip' -O "$tmpdir"/mononoki.zip
	unzip "$tmpdir"/mononoki.zip -d static/fonts/
}