summaryrefslogtreecommitdiffstats
path: root/build/genrc.sh
blob: c0c6194624adc16c13892000989dd8671db37933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DATATYPE="$1"
INFILE="$2"

echo "${DATATYPE} RCDATA"
sed 's/"/""/g' ${INFILE} | awk 'BEGIN { printf("BEGIN\n") } { printf("\"%s\\r\\n\",\n", $0) } END { printf("\"\\0\"\nEND\n") }'

exit 0