Remove some explicit .keys() invocations which are no longer required now that
[cvs2svn.git] / dist.sh
blob124dad04fb6892e93a22c5d86484e5ea4034e1cb
1 #!/bin/sh
3 # Build a cvs2svn distribution.
5 VERSION=1.4.0-dev
6 WC_REV=`svnversion -n .`
7 DIST_BASE=cvs2svn-${VERSION}
8 DIST_FULL=${DIST_BASE}.tar.gz
10 if echo ${WC_REV} | grep -q -e '[^0-9]'; then
11 echo "Packaging requires a single-revision, pristine working copy."
12 echo ""
13 echo "Run 'svn update' to get a working copy without mixed revisions,"
14 echo "and make sure there are no local modifications."
15 exit 1
18 # Clean up anything that might have been left from a previous run.
19 rm -rf dist MANIFEST cvs2svn-${VERSION} ${DIST_FULL}
21 # Build the dist, Python's way.
22 ./setup.py sdist
23 mv dist/${DIST_FULL} .
25 # Unfortunately, building the dist Python's way doesn't seem to give
26 # us an obvious method for including subdirs. So, we rewire it!
27 tar zxf ${DIST_FULL}
28 rm ${DIST_FULL}
29 svn export -q test-data ${DIST_BASE}/test-data
30 svn export -q svntest ${DIST_BASE}/svntest
31 svn export -q www ${DIST_BASE}/www
32 # Oh, and while we're at it, let's fix cvs2svn's version number.
33 sed -e "s/^VERSION = .*/VERSION = '${VERSION}'/" < cvs2svn > cvs2svn.tmp
34 mv cvs2svn.tmp ${DIST_BASE}/cvs2svn
35 chmod a+x ${DIST_BASE}/cvs2svn
36 cp cvs2svn.1 ${DIST_BASE}
37 tar zcf ${DIST_FULL} ${DIST_BASE}
38 rm -rf ${DIST_BASE}
40 # Clean up after this run.
41 rm -rf dist MANIFEST
43 # We're outta here.
44 echo ""
45 echo "Done:"
46 echo ""
47 ls -l ${DIST_FULL}
48 md5sum ${DIST_FULL}
49 echo ""