File: fixtext.sh

package info (click to toggle)
lynx 2.8.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 8,540 kB
  • ctags: 9,352
  • sloc: ansic: 116,677; sh: 1,974; makefile: 973; perl: 342; sed: 93
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 = \\,' \
	$*