Date: Wed, 11 Aug 2010 07:50:43 -0400 From: jhell <jhell@dataix.net> To: freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, jhell@dataix.net Cc: Oliver Fromme <olli@lurza.secnetix.de> Subject: Re: [CFT] [sys/conf/newvers.sh] Cleanup and additions. Message-ID: <4C628E93.4020004@dataix.net> In-Reply-To: <201008110747.o7B7l1I3019500@lurza.secnetix.de> References: <201008110747.o7B7l1I3019500@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/11/2010 03:47, Oliver Fromme wrote: > 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 > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C628E93.4020004>