File: fixtext.sh

package info (click to toggle)
lynx 2.8.9dev11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,556 kB
  • ctags: 12,873
  • sloc: ansic: 133,772; sh: 3,560; makefile: 1,139; 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 = \\,' \
	$*