1 #!/bin/sh 2 set -e 3 4 : ${TOOL_SED:=sed} 5 : ${TOOL_GREP:=grep} 6 : ${TOOL_WC:=wc} 7 CONF=${1:-dhcpcd-definitions.conf} 8 H=${2:-dhcpcd-embedded.h.in} 9 10 INITDEFINES=$($TOOL_GREP "^define " $CONF | $TOOL_WC -l) 11 INITDEFINE6S=$($TOOL_GREP "^define6 " $CONF | $TOOL_WC -l) 12 $TOOL_SED \ 13 -e "s/@INITDEFINES@/$INITDEFINES/" \ 14 -e "s/@INITDEFINE6S@/$INITDEFINE6S/" \ 15 $H 16