From owner-freebsd-stable@FreeBSD.ORG Wed Aug 11 07:47:31 2010 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6284106564A; Wed, 11 Aug 2010 07:47:31 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5781A8FC1D; Wed, 11 Aug 2010 07:47:31 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o7B7l21D019501; Wed, 11 Aug 2010 09:47:17 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o7B7l1I3019500; Wed, 11 Aug 2010 09:47:01 +0200 (CEST) (envelope-from olli) Date: Wed, 11 Aug 2010 09:47:01 +0200 (CEST) Message-Id: <201008110747.o7B7l1I3019500@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, jhell@dataix.net In-Reply-To: X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.4 (lurza.secnetix.de [127.0.0.1]); Wed, 11 Aug 2010 09:47:18 +0200 (CEST) Cc: Subject: Re: [CFT] [sys/conf/newvers.sh] Cleanup and additions. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, jhell@dataix.net List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2010 07:47:32 -0000 jhell wrote: > Based on the parts of the script with the additions for tracking source > using git(1) I set out to add support for mercurial hg(1) and ended up > cleaning some of the script while making some of those additions. > [...] > I have opened a PR: misc/149510 here: http://bit.ly/buBqXc Just out of curiosity, why are you obfuscating this if statement? -if [ ! -r version ] -then - echo 0 > version -fi +[ ! -r version ] && echo 0 >version It should rather be fixed like this (FreeBSD standard is to put if...then on one line): -if [ ! -r version ] -then +if [ ! -r version ]; then On a tangential note ... I've been using a wrapper script for "make kernel" for ages, long before svn existed. It adds the date of the checked-out sources to the release name, e.g. uname -rsm gives "FreeBSD 8.1-PRERELEASE-20100720 i386" on this machine. http://people.freebsd.org/~olli/scripts/makekernel Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "We will perhaps eventually be writing only small modules which are identi- fied by name as they are used to build larger ones, so that devices like indentation, rather than delimiters, might become feasible for expressing local structure in the source language." -- Donald E. Knuth, 1974