On Sun, Aug 20, 2017 at 3:25 AM, Ansgar Burchardt <ans...@debian.org> wrote:
> Dan Nicholson writes: > > On Fri, Aug 18, 2017 at 2:48 PM, Henrique de Moraes Holschuh > > <h...@debian.org> wrote: > >> Wouldn't it be more straigthforward to "test -e || mknod" ? > > > > I definitely considered that, but it seemed more noisy to the code to > > add a conditional for every call. But I'd be fine reworking to that > > approach if that's more acceptable, though. > > You can always introduce a `mknod_if_not_exists` function or so. Though > I'm not sure this is worth here (the name is so long the `test -e` is > almost shorter). > > Ansgar > > function mknod-e () { [ -e "$1" ] || mknod "$@" } -- -- Ben Hildred Automation Support Services