From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 06 May 2024 12:51:39 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s3vwZ-005wEw-0A for lore@lore.pengutronix.de; Mon, 06 May 2024 12:51:39 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1s3vwY-0000LI-Iu; Mon, 06 May 2024 12:51:38 +0200 Received: from mail.thorsis.com ([2003:a:e28:26e4::10]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s3vvw-0008OB-7v for ptxdist@pengutronix.de; Mon, 06 May 2024 12:51:03 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 070CF1487F2A; Mon, 6 May 2024 12:50:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1714992659; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=TrJXIm1pp6Cuu2tKwHcKRkOS+vVbqCgjiW1E+ckxdmQ=; b=CRqOs/WLSSVqrxgvS7FdLzX0C2H6bP36GaD3ULJLFQhR+GKZUBjUIl6T2InyJD8WRNSwtQ Y/6BJpwciuuhSD/m/jPaCnjD2VWj64Vahxsw4yHUblbrGNib17T953hPXSk+B6amQQe2/P lc0HWtRYgU5ei7ezDWz3Bink1RFq8BO9xCv7pEJE1ZbyfFydVD9y8hLQXEeL645iBChC+G 5dNmeXnMni9HRQjwOTBfZfF0kktFQVOji3H0KKg8tLUTJzxABIYOReOvPxI/ge9nI8D75X i4Rzlw3alIx/Td/bKrhR+VsF5zQLk8HvfGjECF80kJWI64i4hCrHougoJovI2Q== From: Alexander Dahl To: ptxdist@pengutronix.de Date: Mon, 6 May 2024 12:50:48 +0200 Message-Id: <20240506105051.323546-2-ada@thorsis.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240506105051.323546-1-ada@thorsis.com> References: <20240506105051.323546-1-ada@thorsis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH v2 1/4] ptxd_make_world_inject: Remove useless test X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Michael Riesch Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false One line above $target is set to "${var}/$(subshell)" and even if $var _and_ the result of the subshell call is empty, there's still the slash. Thus target is never empty. Signed-off-by: Alexander Dahl --- Notes: v2: - no change v1: - implicit scripts/lib/ptxd_make_world_inject.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/lib/ptxd_make_world_inject.sh b/scripts/lib/ptxd_make_world_inject.sh index fe4eb8363..5c2d0dc5f 100644 --- a/scripts/lib/ptxd_make_world_inject.sh +++ b/scripts/lib/ptxd_make_world_inject.sh @@ -11,9 +11,6 @@ ptxd_make_inject() { source="$(echo ${inject_file} | cut -d ":" -f 1)" target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)" - if [ -z "${target}" ]; then - target="${source}" - fi if [[ "${source}" =~ ^/.* ]]; then ptxd_bailout "'${source}' must not be an absolute path!" \ -- 2.39.2