diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/build.sh b/build.sh deleted file mode 100755 index 19d3175..0000000 --- a/build.sh +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | #! /usr/bin/env bash | ||
2 | |||
3 | ff_filter() { | ||
4 | fontforge -c 'open(argv[1]).generate(argv[2])' "$1" "$2" | ||
5 | } | ||
6 | |||
7 | ttf_filter() { | ||
8 | # 1 - source file | ||
9 | # 2 - destination file | ||
10 | BNP=${BNP:="./BitsNPicas.jar"} | ||
11 | java -jar "$BNP" convertbitmap -f ttf -o "$2" "$1" | ||
12 | } | ||
13 | |||
14 | export_fonts() { | ||
15 | for i in src/*; do | ||
16 | local file_name | ||
17 | file_name=$(basename "${i%.*}") | ||
18 | ttf_filter "$i" "build/scientifica/ttf/$file_name.ttf" | ||
19 | ff_filter "$i" "build/scientifica/otb/$file_name.otb" | ||
20 | ff_filter "$i" "build/scientifica/bdf/$file_name.bdf" | ||
21 | done | ||
22 | } | ||
23 | |||
24 | export_plugins() { | ||
25 | cp -r ligature_plugins build/scientifica/ligature_plugins | ||
26 | } | ||
27 | |||
28 | main() { | ||
29 | rm -rf build | ||
30 | mkdir -p build/scientifica/{otb,ttf,bdf} | ||
31 | |||
32 | echo "[~] Exporting ligature plugins ..." | ||
33 | export_plugins | ||
34 | |||
35 | echo "[~] Exporting fonts ..." | ||
36 | export_fonts | ||
37 | |||
38 | echo "[~] Entering build directory ..." | ||
39 | cd build || echo "[!] Failed to enter build directory!" | ||
40 | tar c --file scientifica.tar scientifica | ||
41 | echo "[~] Leaving build directory ..." | ||
42 | |||
43 | echo "[!] Done!" | ||
44 | } | ||
45 | |||
46 | main | ||