-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathcommon.sh
executable file
·78 lines (72 loc) · 2.22 KB
/
common.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
71
72
73
74
75
76
77
78
# to be `source`-ed
# do not call this script directly
function package_sc() {
mkdir -p release/$_Dist
cp script/homepage.url release/$_Dist/主页-使用说明.$_url_extension
cp build/{otfccbuild,otfccdump,merge-otd}$_binary_suffix release/$_Dist/
cp font/$_cjk.ttf release/$_Dist/cjk.ttf
cp font/$_latin.ttf release/$_Dist/latin.ttf
case $_platform in
unix)
cp script/unix/comp.sh release/$_Dist/补全.$_script_extension
cp script/unix/merge.sh release/$_Dist/合并.$_script_extension
cp script/unix/merge+comp.sh release/$_Dist/合并补全.$_script_extension
cp script/unix/pack.sh release/$_Dist/打包.$_script_extension
;;
windows)
cp script/windows/comp.bat release/$_Dist/补全.bat
cp script/windows/merge.bat release/$_Dist/合并.bat
cp script/windows/merge+comp.bat release/$_Dist/合并补全.bat
cp script/windows/pack.bat release/$_Dist/打包.bat
;;
esac
case $_archive in
tar.xz)
cd release/
tar -cJf $_dist.tar.xz $_Dist/
cp $_dist.tar.xz $_Dist.tar.xz
cd ../
;;
7z)
cd release/
7z a -mx -myx -ms=on $_dist.7z $_Dist/
cp $_dist.7z $_Dist.7z
cd ../
;;
esac
}
function package_tc() {
mkdir -p release/$_Dist
cp script/homepage.url release/$_Dist/主頁-使用說明\(簡體\).$_url_extension
cp build/{otfccbuild,otfccdump,merge-otd}$_binary_suffix release/$_Dist/
cp font/$_cjk.ttf release/$_Dist/cjk.ttf
cp font/$_latin.ttf release/$_Dist/latin.ttf
case $_platform in
unix)
cp script/unix/comp.sh release/$_Dist/補全.$_script_extension
cp script/unix/merge.sh release/$_Dist/合併.$_script_extension
cp script/unix/merge+comp.sh release/$_Dist/合併補全.$_script_extension
cp script/unix/pack.sh release/$_Dist/打包.$_script_extension
;;
windows)
cp script/windows/comp.bat release/$_Dist/補全.bat
cp script/windows/merge.bat release/$_Dist/合併.bat
cp script/windows/merge+comp.bat release/$_Dist/合併補全.bat
cp script/windows/pack.bat release/$_Dist/打包.bat
;;
esac
case $_archive in
tar.xz)
cd release/
tar -cJf $_dist.tar.xz $_Dist/
cp $_dist.tar.xz $_Dist.tar.xz
cd ../
;;
7z)
cd release/
7z a -mx -myx -ms=on $_dist.7z $_Dist/
cp $_dist.7z $_Dist.7z
cd ../
;;
esac
}