forked from deanproxy/eMail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_dist
executable file
·65 lines (55 loc) · 1.36 KB
/
make_dist
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
#!/bin/sh
make_dist_file=`pwd`
make_dist_file="$make_dist_file/make_dist.out"
if [ -z $1 ]; then
echo $0 email_version
exit;
fi
VERSION="$1"
printf "\rSetting up configure scripts and version info..."
echo "$VERSION" > VERSION
autoheader
autoconf > /dev/null 2>&1
cd dlib
autoheader
autoconf
cd ..
mkdir -p "email-${VERSION}/dlib"
cmd=`git archive master | tar -x -C email-${VERSION}`
printf "\rDoing a git... "
$cmd > /dev/null
# Get dlib
cd dlib
git archive master | tar -x -C ../email-${VERSION}/dlib > /dev/null
cd ../email-${VERSION}
# Fix VERSION and configure.ac script in release dir
printf "\rParsing files and creating ./configure... "
if [ ! -f configure.in ]; then
echo
echo "Something is wrong... configure.in does not exist out of the repository email."
exit 1
fi
autoheader
autoconf > /dev/null 2>&1
cd dlib
if [ ! -f configure.in ]; then
echo
echo "Something is wrong... configure.in does not exist out of the repository for dlib."
exit 1
fi
autoheader
autoconf
cd ..
# Tar and gzip distrobution file
cd ..
if [ ! -d dist ]; then
mkdir dist
fi
printf "\rTaring and gziping up email-$VERSION... "
tar -cf dist/email-"$VERSION".tar email-"$VERSION"
cd dist
gzip -c email-${VERSION}.tar > email-${VERSION}.tar.gz
bzip2 email-${VERSION}.tar
cd ..
rm -rf email-${VERSION}
printf "\rDistribution file is at dist/email-$VERSION.tar.gz\n"