public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Maciej Barć" <xgqt@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Maciej Barć" <xgqt@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/4] eclass/dotnet-pkg-base.eclass: clarify test, quotes in dolauncher
Date: Thu,  5 Oct 2023 21:10:16 +0200	[thread overview]
Message-ID: <20231005191025.12504-2-xgqt@gentoo.org> (raw)
In-Reply-To: <20231005191025.12504-1-xgqt@gentoo.org>

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
---
 eclass/dotnet-pkg-base.eclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index e2659a829..5b2d6e2dd 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -371,7 +371,7 @@ dotnet-pkg-base_restore_tools() {
 		--add-source "${NUGET_PACKAGES}"
 	)
 
-	if [[ "${1}" ]] ; then
+	if [[ -n "${1}" ]] ; then
 		tool_restore_args+=( --configfile "${1}" )
 		shift
 	fi
@@ -434,7 +434,7 @@ dotnet-pkg-base_test() {
 	debug-print-function "${FUNCNAME[0]}" "${@}"
 
 	local directory
-	if [[ "${1}" ]] ; then
+	if [[ -n "${1}" ]] ; then
 		directory="${1}"
 		shift
 	else
@@ -529,7 +529,7 @@ dotnet-pkg-base_dolauncher() {
 
 	local executable_path executable_name
 
-	if [[ "${1}" ]] ; then
+	if [[ -n "${1}" ]] ; then
 		local executable_path="${1}"
 		shift
 	else
@@ -553,9 +553,9 @@ dotnet-pkg-base_dolauncher() {
 	# compatible with dotnet version ${DOTNET_PKG_COMPAT}.
 
 	for __dotnet_root in \\
-		${EPREFIX}/usr/$(get_libdir)/dotnet-sdk-${DOTNET_PKG_COMPAT} \\
-		${EPREFIX}/opt/dotnet-sdk-bin-${DOTNET_PKG_COMPAT} ; do
-		[ -d \${__dotnet_root} ] && break
+		"${EPREFIX}/usr/$(get_libdir)/dotnet-sdk-${DOTNET_PKG_COMPAT}" \\
+		"${EPREFIX}/opt/dotnet-sdk-bin-${DOTNET_PKG_COMPAT}" ; do
+		[ -d "\${__dotnet_root}" ] && break
 	done
 
 	DOTNET_ROOT="\${__dotnet_root}"
-- 
2.41.0



  reply	other threads:[~2023-10-05 19:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 19:10 [gentoo-dev] [PATCH 1/4] eclass/dotnet-pkg*: remove unnecessary auto-append of project dir Maciej Barć
2023-10-05 19:10 ` Maciej Barć [this message]
2023-10-05 19:10 ` [gentoo-dev] [PATCH 3/4] eclass/nuget.eclass: add special NUGET_API case for Gentoo devs' hosting Maciej Barć
2023-10-05 19:10 ` [gentoo-dev] [PATCH 4/4] eclass/nuget.eclass: partition dotnet-pkg_src_unpack Maciej Barć

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231005191025.12504-2-xgqt@gentoo.org \
    --to=xgqt@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox