123456789101112131415161718192021222324252627 |
- if [ -z "$1" ] ; then
- echo "Usage: conf-header.sh <.config>"
- exit 1
- fi
- cat <<EOF
- EOF
- exec \
- sed \
- -e '/^#$/d' \
- -e '/^[^#]/s:^\([^=]*\)=\(.*\):#define __\1__ \2:' \
- -e '/^#define /s: y$: 1:' \
- -e '/^# .* is not set$/s:^# \(.*\) is not set$:#undef __\1__:' \
- -e 's:^# \(.*\)$:/* \1 */:' \
- $1
|