Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 96517124 authored by Charles Steinkuehler's avatar Charles Steinkuehler Committed by Robert Nelson
Browse files

Preprocess conf files with m4 (#92)


Use m4 to preprocess configuration files, allowing the use of
m4_include() and other features in configuration files.

Signed-off-by: default avatarCharles Steinkuehler <charles@steinkuehler.net>
parent 56a76bf3
Branches
Tags
No related merge requests found
...@@ -106,7 +106,7 @@ check_project_config () { ...@@ -106,7 +106,7 @@ check_project_config () {
#${project_config}.conf #${project_config}.conf
project_config=$(echo ${project_config} | awk -F ".conf" '{print $1}') project_config=$(echo ${project_config} | awk -F ".conf" '{print $1}')
if [ -f ${DIR}/configs/${project_config}.conf ] ; then if [ -f ${DIR}/configs/${project_config}.conf ] ; then
. ${DIR}/configs/${project_config}.conf m4 -P ${DIR}/configs/${project_config}.conf | . /dev/fd/0
export_filename="${deb_distribution}-${release}-${image_type}-${deb_arch}-${time}" export_filename="${deb_distribution}-${release}-${image_type}-${deb_arch}-${time}"
# for automation # for automation
...@@ -116,7 +116,7 @@ check_project_config () { ...@@ -116,7 +116,7 @@ check_project_config () {
echo "time=\"${time}\"" >> ${DIR}/.project echo "time=\"${time}\"" >> ${DIR}/.project
echo "export_filename=\"${export_filename}\"" >> ${DIR}/.project echo "export_filename=\"${export_filename}\"" >> ${DIR}/.project
echo "#" >> ${DIR}/.project echo "#" >> ${DIR}/.project
cat ${DIR}/configs/${project_config}.conf >> ${DIR}/.project m4 -P ${DIR}/configs/${project_config}.conf >> ${DIR}/.project
else else
echo "Invalid *.conf" echo "Invalid *.conf"
exit exit
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment