On 9/30/25 05:19, Alyssa Ross wrote: > [ is likely a shell builtin, so by checking for existence before > running mkdir, we avoid lots of mkdir spawns. > > Signed-off-by: Alyssa Ross > --- > scripts/make-erofs.sh | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/scripts/make-erofs.sh b/scripts/make-erofs.sh > index 551ae4a..ad04844 100755 > --- a/scripts/make-erofs.sh > +++ b/scripts/make-erofs.sh > @@ -61,7 +61,9 @@ while read -r arg1; do > ) > > # shellcheck disable=SC2031 # shadowed in subshell on purpose > - mkdir -p -- "$root/$parent" > + if ! [ -e "$root/$parent" ]; then > + mkdir -p -- "$root/$parent" > + fi > > cp -RT -- "$arg1" "$root/$arg2" > done Reviewed-by: Demi Marie Obenour -- Sincerely, Demi Marie Obenour (she/her/hers)