From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 9984F6FEB; Tue, 30 Sep 2025 09:24:27 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id E5D077080; Tue, 30 Sep 2025 09:24:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) by atuin.qyliss.net (Postfix) with ESMTPS id F35ED707B for ; Tue, 30 Sep 2025 09:24:22 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id BD7C81D000AA; Tue, 30 Sep 2025 05:24:21 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Tue, 30 Sep 2025 05:24:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1759224261; x= 1759310661; bh=8mRkg62zYX/p5Yk9vZ9gbTzYGsNHEcyRqH4DxsSmWuE=; b=I /ATqiv2SwBc8zBxceDH25zGXdm2hLADvjuKNQsV9MnGtWEDE11v739rMvNzTm+2q 9CbQjj53H70SK5zf6004DAYEYmgbnPjGCMHcAQJRjU1u1cvSxtNf5gBriiduNsk/ SC53umF4bLWuupa1sx227/dQWhRsmU7z12nwrq0OgrX1uFc0WtUfmhwG9z8Zkjr2 KtVih+lNVpCc+OvYM37KXlbqfZ00WSg5yu6LZ/AIhvDK3MYWrP4S4khSlzRMbSjT z0WEurn9O8C05YbNLFzWC9WdWxSnuGP0TaSiaQDIo5BA4UQKimRiHvYJ1j+A5prd 6wmhf3fTc6zR8AS5ibJHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1759224261; x=1759310661; bh=8 mRkg62zYX/p5Yk9vZ9gbTzYGsNHEcyRqH4DxsSmWuE=; b=qoZYZhOF1KtegGf4h aS9qfZcl9hCOQVTsuy5wx73vPnP7+MqtB3XN/sM7lqm5Pcdd2lMVzDLNKit9VURT cCxrhVt04tS0WN/hX1q+f11MQlUHRv+r1GoPVzb59EYnicHLePM8u+M/MWLHXG17 5taZ0CctBnCHCcRj6kC1R7PaMOSugZwgFaI+rFO+xJW4Eb+rV8GMNAmCtsdMugEv vIap5qbClBYsyPEtvrpkSqAbaa2dTOmYkdF3xmnyShXypvjEQej/nbvZDrb5iURu REO/jXJxhtnqiQJZ7NnaW8pk/At4JgIUAVQPhYJMU6hARyKVNLP3q/W9O2Kg2MWu 7vpeQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdektdehtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeegueeiud eukeekiedvteffgeekudfhudevvdelvdekhfefieetkeduudejffefgeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep uggvmhhiohgsvghnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Sep 2025 05:24:20 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 121D65CA47EB; Tue, 30 Sep 2025 11:24:19 +0200 (CEST) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH 2/2] scripts/make-erofs.sh: run mkdir less Date: Tue, 30 Sep 2025 11:19:10 +0200 Message-ID: <20250930092249.571803-3-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250930092249.571803-1-hi@alyssa.is> References: <20250930092249.571803-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: RFJRWOMOTSPTW6AXAMDEZ4K7HWDPHTMV X-Message-ID-Hash: RFJRWOMOTSPTW6AXAMDEZ4K7HWDPHTMV X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Demi Marie Obenour X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: [ 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 -- 2.51.0