Re: [CFT] [sys/conf/newvers.sh] Cleanup and additions.

From: Oliver Fromme <olli_at_lurza.secnetix.de>
Date: Wed, 11 Aug 2010 09:47:01 +0200 (CEST)
jhell <jhell_at_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
Received on Wed Aug 11 2010 - 05:47:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC