46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
|
#! /bin/sh
|
||
|
|
||
|
# $Id: krb42netbsd,v 1.1 2002/09/12 12:35:03 joda Exp $
|
||
|
|
||
|
if [ \! -f kuser/kinit.c ]; then
|
||
|
echo "`basename $0`: should be run in top src directory" 1>&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if ! type perl > /dev/null 2>&1 ; then
|
||
|
echo "`basename $0`: you need perl to run this" 1>&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
|
||
|
echo 'Removing preformatted man pages.'
|
||
|
find . -name '*.cat[1358]' | xargs rm -f
|
||
|
rm doc/kth-krb.info
|
||
|
|
||
|
echo 'Fixing .Os in man pages.'
|
||
|
perl -i~ -p -e 's/\.Os "?KTH-KRB"?/.Os/' `find . -name '*.[1358]'`
|
||
|
|
||
|
echo 'Changing $Id: krb42netbsd,v 1.1 2002/09/12 12:35:03 joda Exp $ to $KTH-KRB$.'
|
||
|
## Ugh!
|
||
|
set -- 'RCSID\("' '"\)' '__RCSID("' '"\n "\$NetBSD\$")' \
|
||
|
'/\* ' ' \*/' '/* ' '\n \$NetBSD\$ */' \
|
||
|
'# ' '' '# ' '\n# \$NetBSD\$' \
|
||
|
'\.\\" ' '' '.\\" ' '\n.\\" \$NetBSD\$' \
|
||
|
'dnl ' '' 'dnl ' '\ndnl \$NetBSD\$'
|
||
|
|
||
|
|
||
|
e=
|
||
|
while [ $# -gt 0 ]; do
|
||
|
e="${e}s,$1\\\$Id([^\\\$]*)\\\$$2,$3\\\$KTH-KRB\\1\\\$$4,;"
|
||
|
shift 4
|
||
|
done
|
||
|
|
||
|
perl -i~ -p -e "$e" `find . -type f`
|
||
|
|
||
|
echo 'Inlining <ktypes.h> in krb.h.in.'
|
||
|
perl -i~ -p -e 's,#include <ktypes.h>,#include <sys/types.h>\n#include <inttypes.h>,' lib/krb/krb.h.in
|
||
|
|
||
|
echo 'Remember to update files in basesrc/include/heimdal/.'
|
||
|
|
||
|
exit 0
|