forked from tokumine/Starspan
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmksrcdist.sh.in
executable file
·51 lines (46 loc) · 1.37 KB
/
mksrcdist.sh.in
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
#!/bin/sh
#
# Stript to make StarSpan public source distribution.
# See configure.in
# $Id: mksrcdist.sh.in,v 1.4 2008-04-07 20:41:46 crueda Exp $
#
if [ -z $1 ]; then
echo "USAGE: mksrcdist.sh { <VERSION> | now }"
exit 1
fi
VERSION=$1
if [ "$VERSION" = "now" ]; then
VERSION=`date +"%Y%m%d_%H%M%S"`
tag=r-$VERSION
dotag=y
else
if [ "$VERSION" != "@STARSPAN_VERSION@" ]; then
echo "VERSION mismatch. Check configure.in"
exit 2
fi
tag=`echo release-$VERSION | tr -t . _`
echo "Make tag [y/-]?: cvs -q tag $tag"
read dotag
fi
# $cvsroot: used to export the source from cvs
# (should be anonymously...
#cvsroot=":pserver:[email protected]:/cvsroot/starspan"
# but that's not working, so I'll be using my developer account for now:)
cvsroot=":ext:[email protected]:/cvsroot/starspan"
DISTDIR=/tmp/DISTDIR-starspan/
(test "$dotag" != "y" || cvs -q tag $tag) &&\
mkdir -p $DISTDIR &&\
cd $DISTDIR &&\
echo "Exporting $tag..." &&\
cvs -d$cvsroot -q export -r $tag -d starspan-$VERSION starspan &&\
cd starspan-$VERSION &&\
echo "Reconfiguring..." &&\
./reconf &&\
test -f missing && test -f install-sh && test -f depcomp &&\
cd .. &&\
echo "Packaging..." &&\
tar cf starspan-$VERSION.tar starspan-$VERSION &&\
gzip -9 starspan-$VERSION.tar &&\
rm -rf starspan-$VERSION &&\
ls -l &&\
echo "Done. Check contents of $DISTDIR"