-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrelease.sh
115 lines (93 loc) · 4.51 KB
/
release.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
if [ $# = 3 ]
then
echo $1
else
echo "release 1.6.13 utf8 centos8"
exit 1
fi
path=$(dirname $0)
oldpwd=$(pwd)
cd ${path}
path=$(pwd)
cd ${path}
#############################################################################
# Platform
m=`uname -m`
if uname -o | grep -i linux;
then
o=linux
fi
##############################################################################
# Simplfied Chinese
rm -rf $3-erisemail-bin-cn-$2-${m}-${o}
mkdir $3-erisemail-bin-cn-$2-${m}-${o}
mkdir $3-erisemail-bin-cn-$2-${m}-${o}/html
cp -rf webmail/cn-html-$2/* $3-erisemail-bin-cn-$2-${m}-${o}/html/
cp -rf webmail/images/* $3-erisemail-bin-cn-$2-${m}-${o}/html/
cp -rf webmail/js/* $3-erisemail-bin-cn-$2-${m}-${o}/html/
cp -rf webmail/css/* $3-erisemail-bin-cn-$2-${m}-${o}/html/
cp -rf webmail/jqueryui $3-erisemail-bin-cn-$2-${m}-${o}/html/
cp src/erisemaild $3-erisemail-bin-cn-$2-${m}-${o}/erisemaild
cp src/eriseutil $3-erisemail-bin-cn-$2-${m}-${o}/eriseutil
cp src/erisenotify $3-erisemail-bin-cn-$2-${m}-${o}/erisenotify
cp src/liberisestorage.so $3-erisemail-bin-cn-$2-${m}-${o}/liberisestorage.so
cp src/libldapasn1.so $3-erisemail-bin-cn-$2-${m}-${o}/libldapasn1.so
cp src/liberiseantispam.so $3-erisemail-bin-cn-$2-${m}-${o}/liberiseantispam.so
cp src/postudf.so $3-erisemail-bin-cn-$2-${m}-${o}/postudf.so
cp script/install.sh $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/uninstall.sh $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/erisemail-$2.conf $3-erisemail-bin-cn-$2-${m}-${o}/erisemail.conf
cp script/permit.list $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/reject.list $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/mfilter.xml $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/domain.list $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/webadmin.list $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/clusters.list $3-erisemail-bin-cn-$2-${m}-${o}/
cp script/erisemail.sh $3-erisemail-bin-cn-$2-${m}-${o}/
cp ca/ca.crt $3-erisemail-bin-cn-$2-${m}-${o}/ca.crt
cp ca/server.crt $3-erisemail-bin-cn-$2-${m}-${o}/server.crt
cp ca/server.p12 $3-erisemail-bin-cn-$2-${m}-${o}/server.p12
cp ca/server.key $3-erisemail-bin-cn-$2-${m}-${o}/server.key
cp ca/client.crt $3-erisemail-bin-cn-$2-${m}-${o}/client.crt
cp ca/client.p12 $3-erisemail-bin-cn-$2-${m}-${o}/client.p12
cp ca/client.key $3-erisemail-bin-cn-$2-${m}-${o}/client.key
chmod a+x $3-erisemail-bin-cn-$2-${m}-${o}/*
tar zcf $3-erisemail-bin-cn-$2-${m}-${o}-$1.tar.gz $3-erisemail-bin-cn-$2-${m}-${o}
##############################################################################
# English
rm -rf $3-erisemail-bin-en-$2-${m}-${o}
mkdir $3-erisemail-bin-en-$2-${m}-${o}
mkdir $3-erisemail-bin-en-$2-${m}-${o}/html
cp -rf webmail/en-html-$2/* $3-erisemail-bin-en-$2-${m}-${o}/html/
cp -rf webmail/images/* $3-erisemail-bin-en-$2-${m}-${o}/html/
cp -rf webmail/js/* $3-erisemail-bin-en-$2-${m}-${o}/html/
cp -rf webmail/css/* $3-erisemail-bin-en-$2-${m}-${o}/html/
cp -rf webmail/jqueryui $3-erisemail-bin-en-$2-${m}-${o}/html/
cp src/erisemaild $3-erisemail-bin-en-$2-${m}-${o}/erisemaild
cp src/eriseutil $3-erisemail-bin-en-$2-${m}-${o}/eriseutil
cp src/erisenotify $3-erisemail-bin-en-$2-${m}-${o}/erisenotify
cp src/liberisestorage.so $3-erisemail-bin-en-$2-${m}-${o}/liberisestorage.so
cp src/libldapasn1.so $3-erisemail-bin-en-$2-${m}-${o}/libldapasn1.so
cp src/liberiseantispam.so $3-erisemail-bin-en-$2-${m}-${o}/liberiseantispam.so
cp src/postudf.so $3-erisemail-bin-en-$2-${m}-${o}/postudf.so
cp script/install.sh $3-erisemail-bin-en-$2-${m}-${o}/
cp script/uninstall.sh $3-erisemail-bin-en-$2-${m}-${o}/
cp script/erisemail-$2.conf $3-erisemail-bin-en-$2-${m}-${o}/erisemail.conf
cp script/permit.list $3-erisemail-bin-en-$2-${m}-${o}/
cp script/reject.list $3-erisemail-bin-en-$2-${m}-${o}/
cp script/mfilter.xml $3-erisemail-bin-en-$2-${m}-${o}/
cp script/domain.list $3-erisemail-bin-en-$2-${m}-${o}/
cp script/webadmin.list $3-erisemail-bin-en-$2-${m}-${o}/
cp script/clusters.list $3-erisemail-bin-en-$2-${m}-${o}/
cp script/erisemail.sh $3-erisemail-bin-en-$2-${m}-${o}/
cp ca/ca.crt $3-erisemail-bin-en-$2-${m}-${o}/ca.crt
cp ca/server.p12 $3-erisemail-bin-en-$2-${m}-${o}/server.p12
cp ca/server.crt $3-erisemail-bin-en-$2-${m}-${o}/server.crt
cp ca/server.key $3-erisemail-bin-en-$2-${m}-${o}/server.key
cp ca/client.p12 $3-erisemail-bin-en-$2-${m}-${o}/client.p12
cp ca/client.crt $3-erisemail-bin-en-$2-${m}-${o}/client.crt
cp ca/client.key $3-erisemail-bin-en-$2-${m}-${o}/client.key
chmod a+x $3-erisemail-bin-en-$2-${m}-${o}/*
tar zcf $3-erisemail-bin-en-$2-${m}-${o}-$1.tar.gz $3-erisemail-bin-en-$2-${m}-${o}
cd ${oldpwd}