#! /bin/sh # $Heimdal: heimdal2netbsd,v 1.3 2002/09/12 14:12:18 joda Exp $ # $NetBSD: heimdal2netbsd,v 1.6 2003/01/27 06:19:40 elric 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/heimdal.info echo 'Fixing .Os in man pages.' perl -i~ -p -e 's/\.Os HEIMDAL/.Os/' `find . -name '*.[1358]'` echo 'Changing $Id: heimdal2netbsd,v 1.6 2003/01/27 06:19:40 elric Exp $ to $Heimdal$.' ## 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\\\$Heimdal\\1\\\$$4,;" shift 4 done perl -i~ -p -e "$e" `find . -type f` echo 'Inlining in krb5.h and gssapi.h.' perl -i~ -p -e 's,#include ,#include \n#include \n#include \ntypedef socklen_t krb5_socklen_t;\ntypedef ssize_t krb5_ssize_t;,' lib/gssapi/gssapi.h lib/krb5/krb5.h echo 'Fixing up include paths:' update_inc() { echo " fixing $1 leaving old file in $1~" mv $1 $1~ < $1~ > $1 \ sed -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' \ -e 's,#include ,#include ,' } update_inc lib/krb5/krb5.h update_inc lib/hdb/hdb.h update_inc lib/sl/ss.h echo 'Remember to update files in basesrc/include/heimdal/.' exit 0