File: mktestdist.sh

package info (click to toggle)
gdal 1.10.1+dfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 84,320 kB
  • ctags: 74,726
  • sloc: cpp: 677,199; ansic: 162,820; python: 13,816; cs: 11,163; sh: 10,446; java: 5,279; perl: 4,429; php: 2,971; xml: 1,500; yacc: 934; makefile: 494; sql: 112
file content (51 lines) | stat: -rwxr-xr-x 1,114 bytes parent folder | download | duplicates (5)
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 commiting 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