1*69365232Schristos#!/bin/sh 2*69365232Schristos# 3*69365232Schristos# Use this script to update the bind include files used in the nameserver, 4*69365232Schristos# after you've imported and built the latest libbind code. After you run this, 5*69365232Schristos# cvs import the resulting directory 6*69365232Schristos# 7*69365232Schristos# $ cd /usr/src/external/bsd/libbind/dist 8*69365232Schristos# $ ./include4netbsd . /tmp/include 9*69365232Schristos# $ cd /tmp/include 10*69365232Schristos# $ cvs -d cvs.netbsd.org:/cvsroot import src/include ISC libbind-X-Y-Z 11*69365232Schristos# 12*69365232Schristos 13*69365232SchristosPROG=$(basename $0) 14*69365232Schristosif [ \( -z "$1" \) -o \( -z "$2" \) ] 15*69365232Schristosthen 16*69365232Schristos echo "Usage: $PROG <libbind-src> <include-dest>" 1>&2 17*69365232Schristos exit 1 18*69365232Schristosfi 19*69365232Schristos 20*69365232SchristosLIBBIND=$1 21*69365232SchristosINCLUDE=$2 22*69365232Schristos 23*69365232Schristosmkdir -p $INCLUDE 24*69365232Schristos 25*69365232Schristoscopy() 26*69365232Schristos{ 27*69365232Schristos sed -e 's/ __P((/(/g' \ 28*69365232Schristos -e 's/));/);/g' \ 29*69365232Schristos -e 's/u_int\([136]\)/uint\1/g' \ 30*69365232Schristos -e '/\\file/d' \ 31*69365232Schristos < "$1" > "$2" 32*69365232Schristos} 33*69365232Schristos 34*69365232Schristosfor i in netdb.h res_update.h resolv.h 35*69365232Schristosdo 36*69365232Schristos copy $LIBBIND/include/$i $INCLUDE/$i 37*69365232Schristosdone 38*69365232Schristos 39*69365232Schristosmkdir -p $INCLUDE/arpa 40*69365232Schristos 41*69365232Schristosfor i in inet.h nameser.h nameser_compat.h 42*69365232Schristosdo 43*69365232Schristos copy $LIBBIND/include/arpa/$i $INCLUDE/arpa/$i 44*69365232Schristosdone 45