#!/bin/sh
set -e
-repository=svn+ssh://svn.mit.edu/krb5
+repository=git.mit.edu:/git/krb5
dodoc=t
dosrc=t
checkout=t
# $reltag, $release, $reldate are used for brand.c currently
# $relmajor, $relminor, $relpatch are used for patchlevel.h currently
+if test $checkout = t; then
+ echo "Checking out krb5 with tag $reltag into directory $reldir..."
+ git clone -q -n $repository $reldir
+ (cd $reldir && git checkout -q $reltag --)
+fi
+
#
# $newstyle = t if patchlevel.h is the master version stamp file. If
# so, we don't edit it here.
#
-if test $checkout = t; then
- if svn cat $repository/$reltag/src/patchlevel.h | grep KRB5_RELDATE > /dev/null 2>&1; then
- newstyle=t
- else
- newstyle=nil;
- fi
+if grep KRB5_RELDATE $reldir/src/patchlevel.h > /dev/null 2>&1; then
+ newstyle=t;
else
- if grep KRB5_RELDATE $reldir/src/patchlevel.h > /dev/null 2>&1; then
- newstyle=t;
- else
- newstyle=nil;
- fi
+ newstyle=nil;
fi
if test $newstyle = t; then
echo "parsing new style patchlevel.h..."
- if test $checkout = t; then
- eval `svn cat $repository/$reltag/src/patchlevel.h | sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p'`
- else
- eval `sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < $reldir/src/patchlevel.h`
- fi
+ eval `sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < $reldir/src/patchlevel.h`
if test "$KRB5_RELTAG" != $reltag && \
test "$KRB5_RELTAG" != `echo $reltag|sed 's%[^/]*/%%'` ; then
echo "WARNING: patchlevel.h '$KRB5_RELTAG' != $reltag"
echo "old style patchlevel.h"
fi
-if test $checkout = t; then
- echo "Checking out krb5 with tag $reltag into directory $reldir..."
- svn export $repository/$reltag $reldir
-fi
-
echo "Editing release-specific files..."
if test $newstyle = t; then
#define KRB5_RELDATE "'"$reldate"'"' patchlevel.h > patchlevel.h.new && \
mv patchlevel.h.new patchlevel.h)
if test $checkout = t; then
- (cd $reldir && svn log -v $repository/$reltag > doc/CHANGES)
+ (cd $reldir && git log --stat $repository/$reltag > doc/CHANGES)
fi
else
echo "Nuking unneeded files..."
find $reldir \( -name TODO -o -name todo -o -name .cvsignore \
- -o -name BADSYMS -o -name .Sanitize -o -name .rconf \) -print \
- | xargs rm -f || true
-find $reldir -type d \( -name autom4te.cache -o -name .svn \
+ -o -name .gitignore -o -name BADSYMS -o -name .Sanitize \
+ -o -name .rconf \) -print | xargs rm -f || true
+find $reldir -type d \( -name autom4te.cache -o -name .git \
-o -name \$ac_config_fragdir \) -exec rm -rf {} \; || true
if test $dodoc = t; then