OVMS3/OVMS.V3/components/ovms_webserver/tools/mksrcf

5 lines
221 B
Text
Raw Normal View History

#!/bin/bash
# convert text to C string suitable for printf
# usage: mksrcf file.htm [>file.cpp]
cat $1 | grep -v '^[[:space:]]*$' | sed -e 's:\\:\\\\:g' -e 's:":\\":g' -e 's:^\( *\): \1":' -e 's:$:\\n":' -e 's:%:%%:g'