17c478bd9Sstevel@tonic-gate#! /bin/sh 27c478bd9Sstevel@tonic-gate# 37c478bd9Sstevel@tonic-gate# Copyright (c) 2001 by Sun Microsystems, Inc. 47c478bd9Sstevel@tonic-gate# All rights reserved. 57c478bd9Sstevel@tonic-gate# 67c478bd9Sstevel@tonic-gate 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# Create messages file for zone_sun.tab, country.tab, continent.tab 97c478bd9Sstevel@tonic-gate# 107c478bd9Sstevel@tonic-gateAWK=/usr/bin/nawk 117c478bd9Sstevel@tonic-gateECHO=/usr/bin/echo 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gateZONE_SUN_FILE=zone_sun.tab 147c478bd9Sstevel@tonic-gateCOUNTRY_FILE=country.tab 157c478bd9Sstevel@tonic-gateCONTINENT_FILE=continent.tab 167c478bd9Sstevel@tonic-gate 177c478bd9Sstevel@tonic-gateDOMAIN=SUNW_OST_ZONEINFO 187c478bd9Sstevel@tonic-gate 197c478bd9Sstevel@tonic-gate$ECHO "domain \"$DOMAIN\"" 207c478bd9Sstevel@tonic-gate 217c478bd9Sstevel@tonic-gate$ECHO "#" 22*503609a9SYuri Pankov$ECHO "# These files are located in usr/src/data/zoneinfo" 237c478bd9Sstevel@tonic-gate$ECHO "#" 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gate$ECHO "#" 267c478bd9Sstevel@tonic-gate$ECHO "# continent.tab" 277c478bd9Sstevel@tonic-gate$ECHO "#" 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate# Get 2nd column of continent.tab file 307c478bd9Sstevel@tonic-gate$AWK -F'\t' \ 31*503609a9SYuri Pankov ' 327c478bd9Sstevel@tonic-gate /^#/ { next } 33*503609a9SYuri Pankov { 34*503609a9SYuri Pankov printf "msgid \"%s\"\n", $2 357c478bd9Sstevel@tonic-gate printf "msgstr \"\"\n" 367c478bd9Sstevel@tonic-gate } 377c478bd9Sstevel@tonic-gate ' < $CONTINENT_FILE 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate$ECHO "#" 407c478bd9Sstevel@tonic-gate$ECHO "# country.tab" 417c478bd9Sstevel@tonic-gate$ECHO "#" 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate# Get 2nd column of country.tab file 447c478bd9Sstevel@tonic-gate$AWK -F'\t' \ 45*503609a9SYuri Pankov ' 467c478bd9Sstevel@tonic-gate /^#/ { next } 47*503609a9SYuri Pankov { 48*503609a9SYuri Pankov printf "msgid \"%s\"\n", $2 497c478bd9Sstevel@tonic-gate printf "msgstr \"\"\n" 507c478bd9Sstevel@tonic-gate } 517c478bd9Sstevel@tonic-gate ' < $COUNTRY_FILE 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate$ECHO "#" 557c478bd9Sstevel@tonic-gate$ECHO "# zone.tab" 567c478bd9Sstevel@tonic-gate$ECHO "#" 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gate# Get 5th column (if it exists) of zone_sun.tab file 597c478bd9Sstevel@tonic-gate$AWK -F'\t' \ 60*503609a9SYuri Pankov ' 617c478bd9Sstevel@tonic-gate /^#/ { next } 62*503609a9SYuri Pankov { 637c478bd9Sstevel@tonic-gate if (NF > 4) { 64*503609a9SYuri Pankov printf "msgid \"%s\"\n", $5 657c478bd9Sstevel@tonic-gate printf "msgstr \"\"\n" 667c478bd9Sstevel@tonic-gate } 677c478bd9Sstevel@tonic-gate } 687c478bd9Sstevel@tonic-gate ' < $ZONE_SUN_FILE 69