Print this page
XXX Remove nawk(1)
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/zic/do_pofile.sh
+++ new/usr/src/cmd/zic/do_pofile.sh
1 1 #! /bin/sh
2 2 #
3 3 # Copyright (c) 2001 by Sun Microsystems, Inc.
4 4 # All rights reserved.
5 5 #
6 -# ident "%Z%%M% %I% %E% SMI"
7 6
8 7 #
9 8 # Create messages file for zone_sun.tab, country.tab, continent.tab
10 9 #
11 -AWK=/usr/bin/nawk
10 +AWK=/usr/xpg4/bin/awk
12 11 ECHO=/usr/bin/echo
13 12
14 13 ZONE_SUN_FILE=zone_sun.tab
15 14 COUNTRY_FILE=country.tab
16 15 CONTINENT_FILE=continent.tab
17 16
18 17 DOMAIN=SUNW_OST_ZONEINFO
19 18
20 19 $ECHO "domain \"$DOMAIN\""
21 20
22 21 $ECHO "#"
23 22 $ECHO "# These files are located in usr/src/cmd/zic."
24 23 $ECHO "#"
25 24
26 25 $ECHO "#"
27 26 $ECHO "# continent.tab"
28 27 $ECHO "#"
29 28
30 29 # Get 2nd column of continent.tab file
31 30 $AWK -F'\t' \
32 31 '
33 32 /^#/ { next }
34 33 {
35 34 printf "msgid \"%s\"\n", $2
36 35 printf "msgstr \"\"\n"
37 36 }
38 37 ' < $CONTINENT_FILE
39 38
40 39 $ECHO "#"
41 40 $ECHO "# country.tab"
42 41 $ECHO "#"
43 42
44 43 # Get 2nd column of country.tab file
45 44 $AWK -F'\t' \
46 45 '
47 46 /^#/ { next }
48 47 {
49 48 printf "msgid \"%s\"\n", $2
50 49 printf "msgstr \"\"\n"
51 50 }
52 51 ' < $COUNTRY_FILE
53 52
54 53
55 54 $ECHO "#"
56 55 $ECHO "# zone.tab"
57 56 $ECHO "#"
58 57
59 58 # Get 5th column (if it exists) of zone_sun.tab file
60 59 $AWK -F'\t' \
61 60 '
62 61 /^#/ { next }
63 62 {
64 63 if (NF > 4) {
65 64 printf "msgid \"%s\"\n", $5
66 65 printf "msgstr \"\"\n"
67 66 }
68 67 }
69 68 ' < $ZONE_SUN_FILE
70 69
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX