Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 2010 09:47:01 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, jhell@dataix.net
Subject:   Re: [CFT] [sys/conf/newvers.sh] Cleanup and additions.
Message-ID:  <201008110747.o7B7l1I3019500@lurza.secnetix.de>
In-Reply-To: <freebsd-current.94276.1281476046.4C61C50E.8040900@dataix.net>

next in thread | previous in thread | raw e-mail | index | archive | help
jhell <jhell@dataix.net> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008110747.o7B7l1I3019500>