missing ncurses sources
[tomato.git] / release / src / router / libncurses / headers.sh
bloba7a93b86d18aad13b697eb12ea918844f4769661
1 #! /bin/sh
2 # This shell script is generated by the 'configure' script. It is invoked in a
3 # subdirectory of the build tree. It generates a sed-script in the parent
4 # directory that is used to adjust includes for header files that reside in a
5 # subdirectory of /usr/include, etc.
6 PRG=""
7 while test $# != 3
8 do
9 PRG="$PRG $1"; shift
10 done
11 DST=$1
12 REF=$2
13 SRC=$3
14 TMPSRC=${TMPDIR:-/tmp}/`basename $SRC`$$
15 TMPSED=${TMPDIR:-/tmp}/headers.sed$$
16 echo installing $SRC in $DST
17 case $DST in
18 /*/include/*)
19 END=`basename $DST`
20 for i in `cat $REF/../*/headers |fgrep -v "#"`
22 NAME=`basename $i`
23 echo "s/<$NAME>/<$END\/$NAME>/" >> $TMPSED
24 done
27 echo "" >> $TMPSED
29 esac
30 rm -f $TMPSRC
31 sed -f $TMPSED $SRC > $TMPSRC
32 NAME=`basename $SRC`
33 # Just in case someone gzip'd manpages, remove the conflicting copy.
34 test -f $DST/$NAME.gz && rm -f $DST/$NAME.gz
36 eval $PRG $TMPSRC $DST/$NAME
37 rm -f $TMPSRC $TMPSED