summaryrefslogtreecommitdiff
path: root/src/gen_deftwmrc.sh
blob: ec7188c0f2fbc40401347e0f0c3787767c08b844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

rm -f ${1}
echo '/* ' >>${1}
echo ' * This file is generated automatically from the default' >>${1}
echo ' * twm bindings file system.twmrc by the twm Makefile.' >>${1}
echo ' */' >>${1}
echo '' >>${1}
echo 'const unsigned char *defTwmrc[] = {' >>${1}
sed \
    -e '/^#/d' \
    -e 's/"/\\"/g' \
    -e 's/^/    (const unsigned char *) "/' \
    -e 's/$/",/' \
    <${2} \
    >>${1}
echo '    (const unsigned char *) 0 };' >>${1}