From owner-freebsd-stable@FreeBSD.ORG Wed Aug 11 11:50:47 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 C53541065674; Wed, 11 Aug 2010 11:50:47 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 633208FC08; Wed, 11 Aug 2010 11:50:47 +0000 (UTC) Received: by gxk24 with SMTP id 24so12695gxk.13 for ; Wed, 11 Aug 2010 04:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=bpguUE49jQiceDiAsJcCHMIEGqBQub3Uu5LLxbZ8lHc=; b=bEfzMb/GLHnbOtHTcLgFChjcjlzTAFQilUcB+/wTxyps1jhWDwPX0amwkHLpBHQGCh BP4bfrqXm1iytW+/lP09HQvU1RNwedcgZhQy1y0HhNj1EfInsg3Gh0tf6LrVouukBOWr kDHzmeo8J2VzoyujZYGK+UC0TPBJXfPh1uRlg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=Mre0jbrtmi9LKU3bmtcCAPcfmsRH16UuozldZjfBA/ZFY/Ga99NemFbcND8eV6zcKZ vZVa9jmkUAQKOn6mdlnY3cOab2SPcvKdR8hsF8BzS7vzVA+yIGogNa+1dRQCpc6B692q nb0yVwJb+CO5T/0flLQ1t2oWEQDQerhNgR3dg= Received: by 10.151.11.19 with SMTP id o19mr5479692ybi.414.1281527446569; Wed, 11 Aug 2010 04:50:46 -0700 (PDT) Received: from centel.dataix.local (adsl-99-19-46-227.dsl.klmzmi.sbcglobal.net [99.19.46.227]) by mx.google.com with ESMTPS id m12sm79466ybn.19.2010.08.11.04.50.44 (version=SSLv3 cipher=RC4-MD5); Wed, 11 Aug 2010 04:50:45 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C628E93.4020004@dataix.net> Date: Wed, 11 Aug 2010 07:50:43 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100806 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, jhell@dataix.net References: <201008110747.o7B7l1I3019500@lurza.secnetix.de> In-Reply-To: <201008110747.o7B7l1I3019500@lurza.secnetix.de> X-Enigmail-Version: 1.1.2 OpenPGP: id=89D8547E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Oliver Fromme Subject: Re: [CFT] [sys/conf/newvers.sh] Cleanup and additions. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 11:50:48 -0000 On 08/11/2010 03:47, Oliver Fromme wrote: > 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 > I originally did it that way but on a sheer whim since it was a simple test and did not end up in being some big fancy line I changed it to what it is now. I have no problem changing this back since its only just a visual change & functionality would still be the same. It was just easier on my eyes while reading it for some reason and did not see a need for a multi-line statement. > 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 > Thanks, Ill check this out. Writing before reading that script I have been using a script to build the kernel too. It just set BRANCH_OVERRIDE and whatever other CFLAGS and make flags I want with the addition of looking at kern.smp.cpus and calculating the recommended value to use when using '-j' plus an additional amount if needed. > Best regards > Oliver > Thank you Oliver. -- jhell,v