forked from mutant-remix/mutant-remix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathout_final_full.sh
executable file
·70 lines (53 loc) · 2.55 KB
/
out_final_full.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
cd "$(dirname "$0")"
source ./config.sh
# clean up
echo "clean up existing files..."
rm -rf out/final-pkg
# export using Orxporter
echo "creating images..."
./orxporter/orxport.py -m assets/manifest/out.orx -i ../svg -C cache -q 32x32 -r resvg -o out/final/shortcode -f %f/%d/%s -t ${threads} -l -F svgo,pngc-32,pngc-128,pngc-512,webp-32,webp-128 &&
./orxporter/orxport.py -m assets/manifest/out.orx -i ../svg -C cache -q 32x32 -r resvg -o out/final/codepoint -f %f/%u -t ${threads} -l -F svgo,pngc-32,pngc-128,pngc-512,webp-32,webp-128 &&
./orxporter/orxport.py -m assets/manifest/out.orx -i ../svg -C cache -q 32x32 -r resvg -o out/final/mastodon -f ms_%s -t ${threads} -l -F pngc-128 &&
./orxporter/orxport.py -m assets/manifest/out.orx -i ../svg -C cache -q 32x32 -r resvg -o out/final/font_sources -f png-%z/%u -t ${threads} -l -F pngc-32,pngc-64,pngc-128 &&
# export fonts using Forc
# echo "compiling fonts..."
# python3 ./forc/forc.py -m manifest/font/manifest.json -a manifest/font/aliases.json -i out/final/font_sources -o out/final/font -F sbixOT,sbixOTiOS --afsc
# put together packages
echo "compiling package folders..."
mkdir -p out/final-pkg &&
./orxporter/orxport.py -m assets/manifest/out.orx -j out/final-pkg/mtnt_v${version}_data.json
function make_pkg {
out_folder="out/final-pkg/mtnt_v${version}_${2}"
cp -R assets/texts out/final-pkg &&
mv out/final-pkg/texts "$out_folder" &&
mv "out/final/${1}" "$out_folder/emoji"
# zip -r -q "${out_folder}.zip" "$out_folder"
tar -zcf "${out_folder}.tar.gz" "$out_folder"
}
function make_pkg_font {
file_name="${1}"
out_folder="out/final-pkg/mtnt_${version}_${2}"
cp -R assets/texts out/final-pkg &&
mv out/final-pkg/texts "$out_folder" &&
mkdir -p "${out_folder}/font" &&
mv "out/final/font/${1}" "${out_folder}/font/${file_name}"
# zip -r -q "${out_folder}.zip" "$out_folder"
}
make_pkg shortcode/svgo short_svg
make_pkg shortcode/pngc-32 short_png32
make_pkg shortcode/pngc-128 short_png128
make_pkg shortcode/pngc-512 short_png512
make_pkg shortcode/webp-32 short_webp32
make_pkg shortcode/webp-128 short_webp128
make_pkg mastodon masto
make_pkg codepoint/svgo code_svg
make_pkg codepoint/pngc-32 code_png32
make_pkg codepoint/pngc-128 code_png128
make_pkg codepoint/pngc-512 code_png512
make_pkg codepoint/webp-32 code_webp32
make_pkg codepoint/webp-128 code_webp128
# make_pkg_font MutantStandardEmoji-sbixOT.ttf font_sbixot
# make_pkg_font MutantStandardEmoji-sbixOT-iOS.mobileconfig font_sbixotios
source ./out_coverage.sh
echo "Mutant Remix export complete!"