From: Paul Smith Date: Mon, 11 Nov 2024 14:18:35 GMT Subject: Re: [RFC PATCH v4 05/19] Makefile: use "generate-perl.sh" to massage Perl library Message-ID: <99357763a692a0446624f59199fc91f683d2658f.camel@mad-scientist.net> In-Reply-To: On Mon, 2024-11-11 at 15:13 +0100, Patrick Steinhardt wrote: > > case "$OUTPUT" in > > *.pm) > >   dir="$(dirname $OUTPUT)" > >   if ! test -d "$dir" > >   then > >   mkdir -p "$dir" > >   fi > >      ;; > > esac This seems kind of complicated to me. Why not just simply: case "$OUTPUT" in (*.pm) mkdir -p "$(dirname $OUTPUT)" ;; esac There's no point in testing for existence of the directory before invoking mkdir -p IMO. Maybe the git environment has some rules about this?