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

4 lines
186 B
Bash
Executable file

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