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