On Sun, Aug 02, 2020, T. Kurt Bond wrote: > The linux version of homebrew installs groff's data directory in > /home/linuxbrew/.linuxbrew/share/groff by default. > > I must have cargo culted the check_optarg without checking everything out > when I added the -P option. I've attached a patch to install-font.sh to > make it check that the argument to -P is a directory and that it is > writable.
Good. Thanks. Patch has been applied to install-font.sh on the mom website. > I kept the check that the argument doesn't start with a dash, even though > someone evil might start their directory with a dash. Should that check be > dropped? Bash parses getopts in a rudimentary fashion that doesn't distinguish between an option and an argument. Given the choice between checking for evil (starting a dirname with a dash) and checking for absentmindedness (forgetting to supply the dirname), better to opt for the latter. Although these days it sometimes doesn't seem so, there's far more absentmindedness in the world than evil. :) -- Peter Schaffter http://www.schaffter.ca