327.1.2
by Matthew Fuller
Escape the madness of escaping in CMakeLists and just toss together a |
1 |
#!/bin/sh
|
2 |
# This spits to stdout; we expect to be redirected.
|
|
3 |
||
4 |
src=$1 |
|
5 |
||
6 |
# The header
|
|
7 |
echo '/*' |
|
8 |
echo ' * AUTOGENERATED FILE -- DO NOT EDIT' |
|
9 |
echo ' * This file is generated automatically from the default' |
|
10 |
echo ' * ctwm bindings file system.ctwmrc by the build process' |
|
11 |
echo ' */' |
|
12 |
echo
|
|
443.1.3
by Matthew Fuller
Use NULL instead of (char *)0 for proper semantics. |
13 |
echo '#include <stddef.h> // for NULL' |
443.1.2
by Matthew Fuller
Switch deftwmrc builder back to building a .c file, with a .h bringing |
14 |
echo '#include "deftwmrc.h"' |
15 |
echo
|
|
327.1.2
by Matthew Fuller
Escape the madness of escaping in CMakeLists and just toss together a |
16 |
|
17 |
# We define one big char* arrray of the lines
|
|
443.1.2
by Matthew Fuller
Switch deftwmrc builder back to building a .c file, with a .h bringing |
18 |
echo 'const char *defTwmrc[] = {' |
327.1.2
by Matthew Fuller
Escape the madness of escaping in CMakeLists and just toss together a |
19 |
|
443.1.8
by Matthew Fuller
This will never line up anyway, so don't bother trying. |
20 |
sed \
|
327.1.2
by Matthew Fuller
Escape the madness of escaping in CMakeLists and just toss together a |
21 |
-e 's/"/\\"/g' \ |
22 |
-e 's/^/ \"/' \ |
|
23 |
-e 's/$/",/' \ |
|
24 |
${src} |
|
25 |
||
443.1.3
by Matthew Fuller
Use NULL instead of (char *)0 for proper semantics. |
26 |
echo ' NULL' |
327.1.2
by Matthew Fuller
Escape the madness of escaping in CMakeLists and just toss together a |
27 |
echo '};' |