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 727F1232B7; Fri, 19 Sep 2025 23:28:20 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 86FE1231D5; Fri, 19 Sep 2025 23:28:15 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by atuin.qyliss.net (Postfix) with ESMTPS id 73BC72325B for ; Fri, 19 Sep 2025 23:28:14 +0000 (UTC) Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-ea63e86b79aso1809284276.2 for ; Fri, 19 Sep 2025 16:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758324493; x=1758929293; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SDAQ067zNoGtTbPipzP2rsHzxMhwPWiXnwne3FozCGw=; b=PqkhYEDvXRFDI+ECbTA6GOLAClWt6egK6KU3Y6icdmimGno9cRS+yXMaJNiDd8V9Dg XykyFuUvNKCfgrMmTL2gfJsqGNr9tqNl/YIvb0X5wQB4zvLPNNGzVLVciLNAFlWj7h7U n0WKQSS9lKmuHOFJvUW69NCQ2TUualIP+uB8mkZ0r8sXxgXL6O9VK08DNoGaZlOqV0Yj MAcVAzZpRdEFIqGH7lvS3JRj8RSLqI0XPwhhKzZicval6Zmmi4SQQpVc/mC3cZVdqihr DoTS+QfkG4wej7RbU8P/grT4m2u6mL97CWzCV7lV84/5sSc+FNZeKsqcrwG8c2MNLxYa Kcag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758324493; x=1758929293; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SDAQ067zNoGtTbPipzP2rsHzxMhwPWiXnwne3FozCGw=; b=hyAuqOuV+chNhehb58TFDvMK4EtnuotIH9yKRxh+7lJGuPhqxmRfMUrdHGxO5h4x5K qscvjjY39ugDk2eJ/IprRbj68AFNOhzDJOd0CO50gCV37wZ6FXdNikDqByNeObpNusSX x0UmLdGiumhyjG/l+hGiHbdRyYRPngcbP8tLkpXhqVbj5CHOwpOWgMlEiA2/Y9iFWeJf 7Em3DfoQuZerdCGjf69DS7nHixmy7L57Fxti3NASxtG5T+xVIO6Nq++TVWMESVAqFgBc 0bSIlZdYAOh2xKimZLNQOxHd8TKZf6anql2s2Zh3KUsTD2Yj9TpageRNcrx9DqDQ9/O4 l/QA== X-Gm-Message-State: AOJu0YwUlid9o1m9LRM0pEIO3AImWSptSXEZMG5vt3wCL0casR2V6Xne 1L8ViO3ObNY7N04v3qxufRt17pJJ/g73ZRCoDKr/cAhNAdRsyUfbsp/6/9rZpQ== X-Gm-Gg: ASbGnctqYr6PcX0tEuHHSd+DBV504ykFVBdmiOOsT3fXZdKPL+WsfWPBk7F3WkWBMpi zs3IzXyjaoHBE2cH5FpRKDST8iRiK3sPZ1Mdn7qsSD9sPxMc1WFMfnQnFuxCOulHjsDzuAFwM2B HhmIhhat4octW3FirRvP8qlxxlDwYoYuZL742wxekg46eUxt9QcNfX76qflK3083yXbYC7b6TlG p/EKcG/ef0hbaaO5Eu6wc5eWdU65KGDihtMMq0RtBQRAb6DhiUka4pyfeWBLRZ6UYdS6OuRB7cF tZ8XyR35tUgpbwWcZC46h0K+vnuoj1NXhXVah0QZYzo5KkN6P04HZPZN/9utTg8NCwWzrQJVgjN kAmMi4WQJCsBd8a9FWtr0OYAXwS/RaFwm5CTyF8GJPf/sK9xb7vRlalXgfM40PCFt8K1/Usqnq4 oTJ20oTGEjTiJoOr7mmhCYUALIBQDv8rg6PjneOgKL9go= X-Google-Smtp-Source: AGHT+IGKJvBxqKWmaesy4zVslxcPl7Onf+xystAHmm5XtQd881n7bKontcxMbWNOFBakW2BKYmNqbg== X-Received: by 2002:a05:690c:62c4:b0:731:2d1e:c498 with SMTP id 00721157ae682-73d24e93743mr41368117b3.5.1758324493150; Fri, 19 Sep 2025 16:28:13 -0700 (PDT) Received: from localhost.localdomain (h96-60-249-169.cncrtn.broadband.dynamic.tds.net. [96.60.249.169]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-73971887fe8sm17339197b3.50.2025.09.19.16.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Sep 2025 16:28:12 -0700 (PDT) From: Demi Marie Obenour Date: Fri, 19 Sep 2025 19:26:13 -0400 Subject: [PATCH 3/3] scripts/make-erofs.sh: Avoid unneeded calls to mkdir MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250919-less-dirname-v1-3-5df7ca617b9b@gmail.com> References: <20250919-less-dirname-v1-0-5df7ca617b9b@gmail.com> In-Reply-To: <20250919-less-dirname-v1-0-5df7ca617b9b@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1758324370; l=944; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=608IZ6sAh9utmQpD7kN95duOIrw8aJdlqItcvZEIVR8=; b=ZFbX0OP4cVvj2ep8dowMlK9yeJlst+hK9Zstf4iMsszImGIqwOwTFKc7vZdwVRroIzZpCR/HB D2xQoBsRLqIAtaPg5oVnF9F1/XO7Zvf2TrMS2hq7o17vpleH0WqS7R4 X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: JTRGIFSKOGRRXILNBRJ5OBPH2C572RLE X-Message-ID-Hash: JTRGIFSKOGRRXILNBRJ5OBPH2C572RLE X-MailFrom: demiobenour@gmail.com 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 , Alyssa Ross 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: Don't call it if the target directory already exists. Signed-off-by: Demi Marie Obenour --- scripts/make-erofs.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/make-erofs.sh b/scripts/make-erofs.sh index ac62a65f53e0b6417b164f475a537960fc5203bc..30b83b0b41cbe7bc4fd7786cfcdddcf10c78cc5a 100755 --- a/scripts/make-erofs.sh +++ b/scripts/make-erofs.sh @@ -44,10 +44,15 @@ while read -r arg1; do # a subset of all paths, but this subset includes all of # the ones passed in practice other than /. case $arg2 in - (*/*) parent=${arg2%/*};; - (*) parent=.;; + (*/*) + # Make the parent directory if needed + parent=$root/${arg2%/*} + if [ ! -d "$parent" ]; then mkdir -p -- "$parent"; fi + ;; + (*) + # Parent $root which definitely exists + ;; esac - mkdir -p -- "$root/$parent" cp -RT -- "$arg1" "$root/$arg2" done -- 2.51.0