Re: [RFC PATCH v4 05/19] Makefile: use "generate-perl.sh" to massage Perl library
- From
Paul Smith <paul@mad-scientist.net>
- Date
- Nov 11, 2024, 14:18 UTC
- Message-ID
- <99357763a692a0446624f59199fc91f683d2658f.camel@mad-scientist.net>
- In-Reply-To
- <ZzIQ8zENlz-0CZBX@pks.im>
On Mon, 2024-11-11 at 15:13 +0100, Patrick Steinhardt wrote:
Show 9 quoted lines
> > 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)" ;;
esacThere's no point in testing for existence of the directory before invoking mkdir -p IMO.
Maybe the git environment has some rules about this?