402N/A#!/bin/bash
402N/A#
402N/A# CDDL HEADER START
402N/A#
402N/A# The contents of this file are subject to the terms of the
402N/A# Common Development and Distribution License (the "License").
402N/A# You may not use this file except in compliance with the License.
402N/A#
402N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
402N/A# or http://www.opensolaris.org/os/licensing.
402N/A# See the License for the specific language governing permissions
402N/A# and limitations under the License.
402N/A#
402N/A# When distributing Covered Code, include this CDDL HEADER in each
402N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
402N/A# If applicable, add the following below this CDDL HEADER, with the
402N/A# fields enclosed by brackets "[]" replaced with your own identifying
402N/A# information: Portions Copyright [yyyy] [name of copyright owner]
402N/A#
402N/A# CDDL HEADER END
402N/A#
402N/A#
402N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
402N/A# Use is subject to license terms.
402N/A#
402N/A# ident "@(#)fix_nls_symlinks.sh 1.1 09/08/07 SMI"
402N/A#
402N/A
402N/Aif [ ! -f ../Solaris/readlink.sh ] ; then
402N/A echo "readlink.sh script not found!"
402N/A exit 1
402N/Afi
402N/A
402N/Aif [ -d build/nls ] ; then
402N/A cp -fp ../Solaris/readlink.sh build/nls/
402N/A cd build/nls
402N/A
402N/A if [ ! -f readlink.sh ] ; then
402N/A echo "readlink.sh script not found in the nls directory!"
402N/A exit 1
402N/A fi
402N/A
402N/A chmod 0755 readlink.sh
402N/A
402N/A for file in \
402N/A "af_ZA.ISO-8859-1" \
402N/A "ar_AE.ISO-8859-6" \
402N/A "ar_BH.ISO-8859-6" \
402N/A "ar_DZ.ISO-8859-6" \
402N/A "ar_EG.ISO-8859-6" \
402N/A "ar_IN.UTF-8" \
402N/A "ar_IQ.ISO-8859-6" \
402N/A "ar_JO.ISO-8859-6" \
402N/A "ar_KW.ISO-8859-6" \
402N/A "ar_LB.ISO-8859-6" \
402N/A "ar_LY.ISO-8859-6" \
402N/A "ar_MA.ISO-8859-6" \
402N/A "ar_OM.ISO-8859-6" \
402N/A "ar_QA.ISO-8859-6" \
402N/A "ar_SA.ISO-8859-6" \
402N/A "ar_SD.ISO-8859-6" \
402N/A "ar_SY.ISO-8859-6" \
402N/A "ar_TN.ISO-8859-6" \
402N/A "ar_YE.ISO-8859-6" \
402N/A "be_BY.CP1251" \
402N/A "bg_BG.CP1251" \
402N/A "br_FR.ISO-8859-1" \
402N/A "bs_BA.ISO-8859-2" \
402N/A "ca_ES.ISO-8859-1" \
402N/A "ca_ES.ISO-8859-15@euro" \
402N/A "cs_CZ.ISO-8859-2" \
402N/A "cy_GB.ISO-8859-14" \
402N/A "da_DK.ISO-8859-1" \
402N/A "de_AT.ISO-8859-1" \
402N/A "de_AT.ISO-8859-15@euro" \
402N/A "de_BE.ISO-8859-1" \
402N/A "de_BE.ISO-8859-15@euro" \
402N/A "de_CH.ISO-8859-1" \
402N/A "de_DE.ISO-8859-1" \
402N/A "de_DE.UTF-8" \
402N/A "de_DE.ISO-8859-15@euro" \
402N/A "de_LU.ISO-8859-1" \
402N/A "de_LU.ISO-8859-15@euro" \
402N/A "el_GR.ISO-8859-7" \
402N/A "en_AU.ISO-8859-1" \
402N/A "en_BW.ISO-8859-1" \
402N/A "en_CA.ISO-8859-1" \
402N/A "en_DK.ISO-8859-1" \
402N/A "en_GB.ISO-8859-1" \
402N/A "en_HK.ISO-8859-1" \
402N/A "en_IE.ISO-8859-1" \
402N/A "en_IE.ISO-8859-15@euro" \
402N/A "en_IN.UTF-8" \
402N/A "en_NZ.ISO-8859-1" \
402N/A "en_PH.ISO-8859-1" \
402N/A "en_SG.ISO-8859-1" \
402N/A "en_US.ISO-8859-1" \
402N/A "en_US.ANSI_X3.4-1968" \
402N/A "en_US.UTF-8" \
402N/A "en_ZA.ISO-8859-1" \
402N/A "en_ZW.ISO-8859-1" \
402N/A "es_AR.ISO-8859-1" \
402N/A "es_BO.ISO-8859-1" \
402N/A "es_CL.ISO-8859-1" \
402N/A "es_CO.ISO-8859-1" \
402N/A "es_CR.ISO-8859-1" \
402N/A "es_DO.ISO-8859-1" \
402N/A "es_EC.ISO-8859-1" \
402N/A "es_ES.ISO-8859-1" \
402N/A "es_ES.ISO-8859-15@euro" \
402N/A "es_GT.ISO-8859-1" \
402N/A "es_HN.ISO-8859-1" \
402N/A "es_MX.ISO-8859-1" \
402N/A "es_NI.ISO-8859-1" \
402N/A "es_PA.ISO-8859-1" \
402N/A "es_PE.ISO-8859-1" \
402N/A "es_PR.ISO-8859-1" \
402N/A "es_PY.ISO-8859-1" \
402N/A "es_SV.ISO-8859-1" \
402N/A "es_US.ISO-8859-1" \
402N/A "es_UY.ISO-8859-1" \
402N/A "es_VE.ISO-8859-1" \
402N/A "et_EE.ISO-8859-1" \
402N/A "eu_ES.ISO-8859-1" \
402N/A "eu_ES.ISO-8859-15@euro" \
402N/A "fa_IR.UTF-8" \
402N/A "fi_FI.ISO-8859-1" \
402N/A "fi_FI.ISO-8859-15@euro" \
402N/A "fo_FO.ISO-8859-1" \
402N/A "fr_BE.ISO-8859-1" \
402N/A "fr_BE.ISO-8859-15@euro" \
402N/A "fr_CA.ISO-8859-1" \
402N/A "fr_CH.ISO-8859-1" \
402N/A "fr_FR.ISO-8859-1" \
402N/A "fr_FR.UTF-8" \
402N/A "fr_FR.ISO-8859-15@euro" \
402N/A "fr_LU.ISO-8859-1" \
402N/A "fr_LU.ISO-8859-15@euro" \
402N/A "ga_IE.ISO-8859-1" \
402N/A "ga_IE.ISO-8859-15@euro" \
402N/A "gl_ES.ISO-8859-1" \
402N/A "gl_ES.ISO-8859-15@euro" \
402N/A "gv_GB.ISO-8859-1" \
402N/A "he_IL.ISO-8859-8" \
402N/A "hi_IN.UTF-8" \
402N/A "hr_HR.ISO-8859-2" \
402N/A "hu_HU.ISO-8859-2" \
402N/A "id_ID.ISO-8859-1" \
402N/A "is_IS.ISO-8859-1" \
402N/A "it_CH.ISO-8859-1" \
402N/A "it_IT.ISO-8859-1" \
402N/A "it_IT.ISO-8859-15@euro" \
402N/A "iw_IL.ISO-8859-8" \
402N/A "ja_JP.EUC-JP" \
402N/A "ja_JP.UTF-8" \
402N/A "ja_JP.Shift_JIS" \
402N/A "ka_GE.GEORGIAN-PS" \
402N/A "kl_GL.ISO-8859-1" \
402N/A "ko_KR.EUC-KR" \
402N/A "ko_KR.UTF-8" \
402N/A "kw_GB.ISO-8859-1" \
402N/A "lt_LT.ISO-8859-13" \
402N/A "lv_LV.ISO-8859-13" \
402N/A "mi_NZ.ISO-8859-13" \
402N/A "mk_MK.ISO-8859-5" \
402N/A "mr_IN.UTF-8" \
402N/A "ms_MY.ISO-8859-1" \
402N/A "mt_MT.ISO-8859-3" \
402N/A "nl_BE.ISO-8859-1" \
402N/A "nl_BE.ISO-8859-15@euro" \
402N/A "nl_NL.ISO-8859-1" \
402N/A "nl_NL.ISO-8859-15@euro" \
402N/A "nn_NO.ISO-8859-1" \
402N/A "no_NO.ISO-8859-1" \
402N/A "oc_FR.ISO-8859-1" \
402N/A "pl_PL.ISO-8859-2" \
402N/A "pt_BR.ISO-8859-1" \
402N/A "pt_PT.ISO-8859-1" \
402N/A "pt_PT.ISO-8859-15@euro" \
402N/A "ro_RO.ISO-8859-2" \
402N/A "ru_RU.ISO-8859-5" \
402N/A "ru_RU.KOI8-R" \
402N/A "ru_RU.UTF-8" \
402N/A "ru_UA.KOI8-U" \
402N/A "sk_SK.ISO-8859-2" \
402N/A "sl_SI.ISO-8859-2" \
402N/A "sq_AL.ISO-8859-1" \
402N/A "sr_YU.ISO-8859-2" \
402N/A "sr_YU.ISO-8859-5@cyrillic" \
402N/A "sv_FI.ISO-8859-1" \
402N/A "sv_FI.ISO-8859-15@euro" \
402N/A "sv_SE.ISO-8859-1" \
402N/A "ta_IN.UTF-8" \
402N/A "te_IN.UTF-8" \
402N/A "tg_TJ.KOI8-T" \
402N/A "th_TH.TIS-620" \
402N/A "tl_PH.ISO-8859-1" \
402N/A "tr_TR.ISO-8859-9" \
402N/A "uk_UA.KOI8-U" \
402N/A "ur_PK.UTF-8" \
402N/A "uz_UZ.ISO-8859-1" \
402N/A "vi_VN.UTF-8" \
402N/A "yi_US.CP1255" \
402N/A "zh_CN.GB2312" \
402N/A "zh_CN.GB18030" \
402N/A "zh_CN.GBK" \
402N/A "zh_CN.UTF-8" \
402N/A "zh_HK.BIG5-HKSCS" \
402N/A "zh_TW.BIG5" \
402N/A "zh_TW.EUC-TW"
402N/A do
402N/A cd ${file}
402N/A if [ -L "LC_CTYPE" ] ; then
402N/A echo "Fixing symlink for ${file}."
402N/A filename=`../readlink.sh "LC_CTYPE"`
402N/A linkname=`basename ${filename}`
402N/A if [ -f "../${linkname}" ] ; then
402N/A rm LC_CTYPE
402N/A ln -sf "../${linkname}" "LC_CTYPE"
402N/A fi
402N/A fi
402N/A cd - > /dev/null 2>&1
402N/A done
402N/Aelse
402N/A echo "\$(topdir)/build/nls directory was not found!"
402N/A echo "This scriptmust be run from the toplevel build directory."
402N/A exit 1
402N/Afi
402N/A
402N/Aexit 0
402N/A