Code

still WIP. added tree-descending code
[inkscape.git] / src / extension / script / wrap_swig_module.sh
1 #!/bin/sh
3 inf=$1
4 outf=$2
5 datestr=`date`
7 echo "" > ${outf}
8 echo "/* ###################################################" >> ${outf}
9 echo "## This file generated by wrap_swig_module.sh from" >> ${outf}
10 echo "## ${inf} on ${datestr}" >> ${outf}
11 echo "## DO NOT EDIT" >> ${outf}
12 echo "################################################### */" >> ${outf}
13 echo "" >> ${outf}
15 echo "static char *inkscape_module_script =" >> ${outf}
16 echo "\"\n\"" >> ${outf}
18 cat ${inf} | \
19 sed -e 's/\"/\\"/g' -e 's/^/\"/g' -e 's/$/\\n\"/g' >> ${outf}
21 echo "\"\n\";" >> ${outf}