File: fixtext.sh

package info (click to toggle)
lynx-cur 2.8.9dev1-2
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 14,924 kB
  • sloc: ansic: 133,222; sh: 3,712; makefile: 1,232; perl: 995; yacc: 743
file content (10 lines) | stat: -rwxr-xr-x 384 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

# xgettext only processes literal strings.  Someone with a poor sense of humor
# decided to ignore strings in preprocessor lines.  So we construct a fake
# ".c" file with the definitions turned into literals.

sed	-e 's/")/");/' \
	-e 's/^#define[ 	]*\([^ 	]*\)[ 	]*gettext/char *\1 = gettext/' \
	-e 's,^#define[ 	]*\([^ 	]*\)[ 	]*\\,/* #define \1 */char *\1 = \\,' \
	$*