-
Notifications
You must be signed in to change notification settings - Fork 12
/
mktestdist.sh
executable file
·51 lines (38 loc) · 1.09 KB
/
mktestdist.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
#!/bin/sh
if [ $# -lt 1 ] ; then
echo "Usage: mkgdaldist version [-nologin]"
echo
echo "Example: mkgdaldist 1.1.4"
exit
fi
GDAL_VERSION=$1
if test "$GDAL_VERSION" != "`cat VERSION`" ; then
echo
echo "NOTE: local VERSION file (`cat VERSION`) does not match supplied version ($GDAL_VERSION)."
echo " Consider updating local VERSION file, and committing to CVS."
echo
fi
rm -rf dist_wrk
mkdir dist_wrk
cd dist_wrk
export CVSROOT=:pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot
if test "$2" = "-nologin" -o "$3" = "-nologin" ; then
echo "Skipping login"
else
echo "Please type anonymous if prompted for a password."
cvs login
fi
cvs -Q checkout gdalautotest
if [ \! -d gdalautotest ] ; then
echo "cvs checkout reported an error ... abandoning mktestdist"
cd ..
rm -rf dist_wrk
exit
fi
find gdalautotest -name CVS -exec rm -rf {} \;
mv gdalautotest gdalautotest-${GDAL_VERSION}
rm -f ../gdalautotest-${GDAL_VERSION}.tar.gz
tar cf ../gdalautotest-${GDAL_VERSION}.tar gdalautotest-${GDAL_VERSION}
gzip -9 ../gdalautotest-${GDAL_VERSION}.tar
cd ..
rm -rf dist_wrk