-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkrelease.sh
executable file
·55 lines (44 loc) · 1.14 KB
/
mkrelease.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
#!/bin/sh
#
# mkrelease.sh - prepares Shapelib source distribution package
#
if [ $# -lt 1 ] ; then
echo "Usage: mkrelease.sh <version>"
echo " <version> - version number used in name of generated archive."
echo
echo "Example: mkrelease 1.3.0beta1"
exit
fi
#
# Processing script input arguments
#
VERSION=$1
#
# Checkout Shapelib sources from the repository
#
echo "* Downloading Shapelib sources from CVS..."
rm -rf dist_wrk
mkdir dist_wrk
cd dist_wrk
cvs -d :pserver:[email protected]:/cvs/maptools/cvsroot export -D now shapelib
if [ \! -d shapelib ] ; then
echo "checkout reported an error ..."
echo "perhaps you need to do:"
echo "cvs -d :pserver:[email protected]:/cvs/maptools/cvsroot login"
cd ..
rm -rf dist_wrk
exit
fi
#
# Make distribution packages
#
echo "* Making distribution packages..."
mv shapelib shapelib-${VERSION}
rm -f ../shapelib-${VERSION}.tar.gz ../shapelib-${VERSION}.zip
tar cf ../shapelib-${VERSION}.tar shapelib-${VERSION}
gzip -9 ../shapelib-${VERSION}.tar
zip -r ../shapelib-${VERSION}.zip shapelib-${VERSION}
echo "* Cleaning..."
cd ..
rm -rf dist_wrk
echo "*** The End ***"