2005-11-06 00:46:13 -08:00
|
|
|
if [ x$2 = x ]; then
|
|
|
|
echo usage: "$0 <var_name> <file_name>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2005-11-07 19:57:40 -08:00
|
|
|
VARNAME=$1
|
|
|
|
INPUT=$2
|
|
|
|
|
2006-05-14 16:45:37 -07:00
|
|
|
echo "static const char $VARNAME [] = \"\""
|
2005-11-07 21:01:42 -08:00
|
|
|
sed 's/\\/\\\\/g' $INPUT | sed 's/"/\\"/g' | sed 's/^\(.*\)$/"\1\\n"/' || exit $?
|
2005-11-06 00:46:13 -08:00
|
|
|
echo ";"
|