-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_dist
More file actions
executable file
·77 lines (65 loc) · 1.66 KB
/
make_dist
File metadata and controls
executable file
·77 lines (65 loc) · 1.66 KB
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
#!/bin/sh
make_dist_file=`pwd`
make_dist_file="$make_dist_file/make_dist.out"
if [ -z $1 ]; then
echo $0 email_version cvs_branch
exit;
fi
if [ -z $2 ]; then
echo $0 email_version cvs_branch
exit;
fi
branch="$2"
# Check files and make sure we have everyone ready.
if [ ! -f configure.in.dist ]
then
echo "No configure.in available..."
exit -1
fi
DATE="`date +%x-%I:%M:%S%p_%Z`"
VERSION="$1"
printf "\rSetting up configure scripts and version info..."
echo "s!@date@!$DATE!" > "$make_dist_file"
echo "s!@ver@!$VERSION!" >> "$make_dist_file"
sed -f "$make_dist_file" configure.in.dist > configure.in
echo "$VERSION" > VERSION
autoheader
autoconf > /dev/null 2>&1
if [ "$2" = "-b" ]
then
rm -f "$make_dist_file"
echo
exit;
fi
cd dlib
autoheader
autoconf
cd ..
# Build svn command
cmd="svn export -q http://svn.cleancode.org/svn/email/${branch} email-${VERSION}"
# Make a temporary directory and cvs export the HEAD
printf "\rDoing a '${cmd}'... "
mkdir "$HOME"/temp
cd "$HOME"/temp
$cmd
# Get dlib
cd email-${VERSION}
svn export -q http://svn.cleancode.org/svn/dlib
# Fix VERSION and configure.ac script in release dir
printf "\rParsing files and creating ./configure... "
sed -f "$make_dist_file" configure.in.dist > configure.in
autoheader
autoconf > /dev/null 2>&1
rm -f configure.in.dist make_dist
cd dlib
autoheader
autoconf
cd ..
# Tar and gzip distrobution file
cd ..
printf "\rTaring and gziping up email-$VERSION... "
tar -czf email-"$VERSION".tar.gz email-"$VERSION"
mv $HOME/temp/email-"$VERSION".tar.gz $HOME
rm -rf $HOME/temp
rm -f "$make_dist_file"
printf "\rDistribution file is at $HOME/email-$VERSION.tar.gz\n"