File: fixtext.sh

package info (click to toggle)
lynx 2.9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,024 kB
  • sloc: ansic: 137,142; sh: 4,022; perl: 1,523; makefile: 1,193; yacc: 783
file content (11 lines) | stat: -rwxr-xr-x 444 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# $LynxId: fixtext.sh,v 1.2 2021/01/07 00:21:03 tom Exp $

# 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 = \\,' \
	"$@"