groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Potential enhancements to install-font.sh from https://www.schaffter


From: James K. Lowden
Subject: Re: Potential enhancements to install-font.sh from https://www.schaffter.ca/mom/bin/install-font.sh
Date: Wed, 29 Apr 2020 17:04:31 -0400

On Tue, 28 Apr 2020 17:45:46 -0400
Peter Schaffter <address@hidden> wrote:

> > Also, wouldn't this script be useful to include in the groff
> > distribution?
> 
> I'm inclined to think so, however it contains non-portable bashisms
> and so might not be appropriate.  The script was a quick and dirty
> solution to font installation.  

That's the best and biggest Q&D shell script I've ever seen.  

> Something similar but more robust and not reliant on a particular
> shell interpreter would be better.

I just took a look, Peter, because I have some experience writing
Bourne shell scripts.  I don't see anything bash-specific, just looking
over it.  You might just change #!/bin/bash to #!/bin/sh; I think it
will run pretty well, maybe perfectly.  

If I were publishing it, I'd remove the VT100 escape codes, and format
my if statements without semicolons:

        if [ foo ]
        then
                bar
        fi

because that's what Steven Bourne intended.  ;-)  

If you decide to add it to the distibution, I'll write the man page.  

--jkl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]