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