3 # Generate code for including a copy of the default tigrc inside the
6 # Usage: $0 /path/to/tigrc
8 # Copyright (c) 2014 Jonas Fonseca <jonas.fonseca@gmail.com>
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
23 if test -z "$NO_BUILTIN_TIGRC"; then
24 sed 's/\s*#.*//' "$TIGRC" |
sed 's,\\,\\\\\\\\,g' |
sed 's,",\\\\",g' |
sed 's/ \+/ /g'
30 echo "/* Generated by $0 on $(date) */"
31 echo "const char *builtin_config ="
33 read_tigrc |
while read line
; do
36 *) printf ' "%s\\n"\n' "$line"