1#! /bin/sh 2# 3# Copyright (c) 2001 by Sun Microsystems, Inc. 4# All rights reserved. 5# 6 7# 8# Create messages file for zone_sun.tab, country.tab, continent.tab 9# 10AWK=/usr/bin/nawk 11ECHO=/usr/bin/echo 12 13ZONE_SUN_FILE=zone_sun.tab 14COUNTRY_FILE=country.tab 15CONTINENT_FILE=continent.tab 16 17DOMAIN=SUNW_OST_ZONEINFO 18 19$ECHO "domain \"$DOMAIN\"" 20 21$ECHO "#" 22$ECHO "# These files are located in usr/src/data/zoneinfo" 23$ECHO "#" 24 25$ECHO "#" 26$ECHO "# continent.tab" 27$ECHO "#" 28 29# Get 2nd column of continent.tab file 30$AWK -F'\t' \ 31 ' 32 /^#/ { next } 33 { 34 printf "msgid \"%s\"\n", $2 35 printf "msgstr \"\"\n" 36 } 37 ' < $CONTINENT_FILE 38 39$ECHO "#" 40$ECHO "# country.tab" 41$ECHO "#" 42 43# Get 2nd column of country.tab file 44$AWK -F'\t' \ 45 ' 46 /^#/ { next } 47 { 48 printf "msgid \"%s\"\n", $2 49 printf "msgstr \"\"\n" 50 } 51 ' < $COUNTRY_FILE 52 53 54$ECHO "#" 55$ECHO "# zone.tab" 56$ECHO "#" 57 58# Get 5th column (if it exists) of zone_sun.tab file 59$AWK -F'\t' \ 60 ' 61 /^#/ { next } 62 { 63 if (NF > 4) { 64 printf "msgid \"%s\"\n", $5 65 printf "msgstr \"\"\n" 66 } 67 } 68 ' < $ZONE_SUN_FILE 69