From owner-svn-src-head@FreeBSD.ORG Tue Oct 19 15:18:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA975106564A; Tue, 19 Oct 2010 15:18:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 989068FC12; Tue, 19 Oct 2010 15:18:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9JFIeu9018818; Tue, 19 Oct 2010 15:18:40 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JFIeAh018816; Tue, 19 Oct 2010 15:18:40 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201010191518.o9JFIeAh018816@svn.freebsd.org> From: Ed Maste Date: Tue, 19 Oct 2010 15:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214060 - head/usr.sbin/pc-sysinstall/backend-query X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 15:18:40 -0000 Author: emaste Date: Tue Oct 19 15:18:40 2010 New Revision: 214060 URL: http://svn.freebsd.org/changeset/base/214060 Log: Simplify and significantly speed up the timezone listing backend script. Reviewed by: imp Modified: head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh Tue Oct 19 15:12:16 2010 (r214059) +++ head/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh Tue Oct 19 15:18:40 2010 (r214060) @@ -25,19 +25,10 @@ # # $FreeBSD$ -rm ${TMPDIR}/.tzonetmp >/dev/null 2>/dev/null - # Backend script which lists all the available timezones for front-ends to display -while read line -do - echo "$line" | grep "^#" >/dev/null 2>/dev/null - if [ "$?" != "0" ] - then - echo "$line" | tr -s "\t" ":" | cut -d ":" -f 3-4 >>${TMPDIR}/.tzonetmp - fi -done < /usr/share/zoneinfo/zone.tab - -sort ${TMPDIR}/.tzonetmp -rm -f ${TMPDIR}/.tzonetmp >/dev/null 2>/dev/null +egrep -v '^#' /usr/share/zoneinfo/zone.tab |\ + tr -s "\t" ":" |\ + cut -d ":" -f 3-4 |\ + sort exit 0