Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Mar 2010 13:43:14 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Ivan Voras <ivoras@freebsd.org>
Subject:   Re: Another tool for updating /etc -- lua||other script language bikeshed
Message-ID:  <201003241343.14145.jhb@freebsd.org>
In-Reply-To: <hod8p8$iuc$1@dough.gmane.org>
References:  <201003231108.45102.jhb@freebsd.org> <201003241002.56335.jhb@freebsd.org> <hod8p8$iuc$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 24 March 2010 10:49:12 am Ivan Voras wrote:
> On 03/24/10 15:02, John Baldwin wrote:
> > On Wednesday 24 March 2010 9:11:21 am Ivan Voras wrote:
> >> On 03/23/10 16:08, John Baldwin wrote:
> >>
> >> [snip - looks like a good utility, will probably use it instead of
> >> mergemaster if it gets committed, like the idea about automated updates]
> >>
> >>> To that end, I wrote a new tool that I think does a decent job of solving
> >>> these goals.
> >>
> >> Since the issue comes around very rarely, I assume there are not many
> >> people who also get the shivers when they see a shell script (and then a
> >> "posixy" /bin/sh shell script) more than a 100 lines long? :)
> >>
> >> Wouldn't it be nice to have a "blessed" (i.e. present-in-base) script
> >> language interpreter with a syntax that has evolved since the 1970-ies?
> >> (with a side-glance to C that *has* evolved since the K&R style).
> >
> > "You can write Fortran in any language."
> 
> I feel I should quote some saying from a holy book saying "Ah, but some 
> languages make it harder than the others!" but I don't know of any such :)
> 
> > If there are specific things in specific scripts that are poorly commented or
> > implemented then I would work on fixing those.  The same is true of the
> > mountain of C code in the tree.  Rewriting them in a different language will
> > not automatically make them any better.
> 
> C is good enough. I'm after /bin/sh here.

I think if you were to read the source to etcupdate.sh you would find that
it is actually rather close to how I would write it if I were to do it in C
(except it is far less complicated now since I can use tools like diff
directly).

-- 
John Baldwin



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