1#!/bin/sh
2#
3#
4#	xtrojka (c) 1994,1995,1996 Maarten Los
5#
6#	#include "COPYRIGHT"
7#
8#	created:	18.ii.1996
9#	modified:
10#
11#	This script creates a C-source resource file from the
12#	original 'XTrojka' resource.
13#	Also, it makes a header file containing string definitions
14#	for non-Xresource loadable strings
15#
16#	These files will be included
17#	in the source code as a fall-back resource.
18#
19set -x
20INPUT=XTrojka.uk
21RESFILE=_resdefs.h
22HFILE=_strdefs.h
23H="/* hoi */"
24
25#
26# create the res-file
27#
28echo "/* Automatically generated by $0. Do not edit */" > $RESFILE
29cat $INPUT | sed -e '/^!/d' | awk '{ printf("\"%s\",\n", $0) }' >> $RESFILE
30echo NULL >> $RESFILE
31
32#
33# create the strings file
34#
35echo "/* Automatically generated by $0. Do not edit */" > $HFILE
36cat $INPUT | sed -ne's/^!STR/#define/gp' >> $HFILE
37
38
39