File: resgen

package info (click to toggle)
xtrojka 123-14
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 492 kB
  • ctags: 443
  • sloc: ansic: 3,087; makefile: 135; sh: 19
file content (37 lines) | stat: -rwxr-xr-x 792 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
#
#
#	xtrojka (c) 1994,1995,1996 Maarten Los
#
#	#include "COPYRIGHT"	
#
#	created:	18.ii.1996
#	modified:
#
#	This script creates a C-source resource file from the 
#	original 'XTrojka' resource. 
#	Also, it makes a header file containing string definitions
#	for non-Xresource loadable strings
#
#	These files will be included
#	in the source code as a fall-back resource.
#
INPUT=XTrojka
RESFILE=_resdefs.h
HFILE=_strdefs.h
H="/* hoi */"

#
# create the res-file
#
echo "/* Automatically generated by $0. Do not edit */" > $RESFILE
cat $INPUT | sed -e '/^!/d' | awk '{ printf("\"%s\",\n", $0) }' >> $RESFILE
echo NULL >> $RESFILE

#
# create the strings file
#
echo "/* Automatically generated by $0. Do not edit */" > $HFILE
cat $INPUT | sed -ne's/^!STR/#define/gp' >> $HFILE