From owner-svn-src-all@freebsd.org Sat Dec 19 13:19:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8612A4C92E; Sat, 19 Dec 2015 13:19:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A184115F7; Sat, 19 Dec 2015 13:19:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBJDJdqb015300; Sat, 19 Dec 2015 13:19:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBJDJdlw015299; Sat, 19 Dec 2015 13:19:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201512191319.tBJDJdlw015299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 19 Dec 2015 13:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292468 - head/tools/tools/locale/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 13:19:41 -0000 Author: bapt Date: Sat Dec 19 13:19:39 2015 New Revision: 292468 URL: https://svnweb.freebsd.org/changeset/base/292468 Log: Fix indentation to make the script more readable Modified: head/tools/tools/locale/tools/finalize Modified: head/tools/tools/locale/tools/finalize ============================================================================== --- head/tools/tools/locale/tools/finalize Sat Dec 19 12:28:22 2015 (r292467) +++ head/tools/tools/locale/tools/finalize Sat Dec 19 13:19:39 2015 (r292468) @@ -10,9 +10,9 @@ usage () { - echo "finalize ' to package standard localization" - echo "type must be one of { monetdef, msgdef, numericdef, timedef, colldef, ctypedef }" - exit 1 + echo "finalize ' to package standard localization" + echo "type must be one of { monetdef, msgdef, numericdef, timedef, colldef, ctypedef }" + exit 1 } [ $# -ne 1 ] && usage @@ -38,48 +38,48 @@ grep '^LOCALES+' ${old}/Makefile > ${TEM if [ $1 = "ctypedef" ] then -keep=$(cat ${TEMP} | awk '{ print $2 ".src" }') -(cd ${old} && md5 -r ${keep} | sort) > ${TEMP2} -keep=$(awk '{ if ($1 != last1) print $2; last1 = $1; }' ${TEMP2}) -for original in ${keep} -do - cp ${old}/${original} ${new}/ -done -awk '{ if ($1 == last1) { print "SYMPAIRS+=\t" last2 " " $2 } \ -else {last1 = $1; last2 = $2}}' ${TEMP2} > ${TEMP3} -rm -f ${TEMP2} + keep=$(cat ${TEMP} | awk '{ print $2 ".src" }') + (cd ${old} && md5 -r ${keep} | sort) > ${TEMP2} + keep=$(awk '{ if ($1 != last1) print $2; last1 = $1; }' ${TEMP2}) + for original in ${keep} + do + cp ${old}/${original} ${new}/ + done + awk '{ if ($1 == last1) { print "SYMPAIRS+=\t" last2 " " $2 } \ + else {last1 = $1; last2 = $2}}' ${TEMP2} > ${TEMP3} + rm -f ${TEMP2} /usr/bin/sed -E -e 's/[ ]+/ /g' \ ${CLDRDIR}/posix/UTF-8.cm \ > ${base}/../etc/final-maps/map.UTF-8 -CHARMAPS="ARMSCII-8 Big5 Big5HKSCS CP1131 CP1251 \ - CP866 GB2312 GBK ISCII-DEV ISO8859-1 \ - ISO8859-13 ISO8859-15 ISO8859-2 ISO8859-4 \ - ISO8859-5 ISO8859-7 ISO8859-9 KOI8-R KOI8-U \ - PT154 SJIS US-ASCII eucCN eucJP eucKR" - -# GB18030 blows up, use pre-generate Illumos version - -for map in ${CHARMAPS} -do -encoding=${map} -if [ ${map} = "Big5HKSCS" ] -then -encoding="Big5" -fi -/usr/local/bin/perl ${base}/convert_map.pl \ - ${base}/../etc/charmaps/${map}.TXT ${encoding} \ - | /usr/bin/sed -E -e 's/ +/ /g' \ - > ${base}/../etc/final-maps/map.${map} - echo map ${map} converted. -done + CHARMAPS="ARMSCII-8 Big5 Big5HKSCS CP1131 CP1251 \ + CP866 GB2312 GBK ISCII-DEV ISO8859-1 \ + ISO8859-13 ISO8859-15 ISO8859-2 ISO8859-4 \ + ISO8859-5 ISO8859-7 ISO8859-9 KOI8-R KOI8-U \ + PT154 SJIS US-ASCII eucCN eucJP eucKR" + + # GB18030 blows up, use pre-generate Illumos version + + for map in ${CHARMAPS} + do + encoding=${map} + if [ ${map} = "Big5HKSCS" ] + then + encoding="Big5" + fi + /usr/local/bin/perl ${base}/convert_map.pl \ + ${base}/../etc/charmaps/${map}.TXT ${encoding} \ + | /usr/bin/sed -E -e 's/ +/ /g' \ + > ${base}/../etc/final-maps/map.${map} + echo map ${map} converted. + done else # below is everything but ctypedef -keep=$(cat ${TEMP} | awk '{ print $2 }') -for original in ${keep} -do - cp ${old}/${original}.src ${new}/ -done + keep=$(cat ${TEMP} | awk '{ print $2 }') + for original in ${keep} + do + cp ${old}/${original}.src ${new}/ + done fi