dhcpcd/genembedh
Roy Marples ae4e592fa2 Remove hard coded DHCP/DHCPv6 options and then to dhcpcd-definitions.conf
This file replaces dhcpcd-embedded.conf
This actually results in a slightly smaller binary than before and has the
added advantage that the option definitions are now all held within one file.
2013-12-02 16:42:09 +00:00

16 lines
350 B
Bash
Executable File

#!/bin/sh
set -e
: ${TOOL_SED:=sed}
: ${TOOL_GREP:=grep}
: ${TOOL_WC:=wc}
CONF=${1:-dhcpcd-definitions.conf}
H=${2:-dhcpcd-embedded.h.in}
INITDEFINES=$($TOOL_GREP "^define " $CONF | $TOOL_WC -l)
INITDEFINE6S=$($TOOL_GREP "^define6 " $CONF | $TOOL_WC -l)
$TOOL_SED \
-e "s/@INITDEFINES@/$INITDEFINES/" \
-e "s/@INITDEFINE6S@/$INITDEFINE6S/" \
$H