public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/, scripts/rsync-generation/
Date: Fri, 24 Feb 2023 18:52:01 +0000 (UTC)	[thread overview]
Message-ID: <1677264698.82a3b8ba04a52268330028ea239a91bbdeb55890.sam@gentoo> (raw)

commit:     82a3b8ba04a52268330028ea239a91bbdeb55890
Author:     Peter Foley <pefoley2 <AT> pefoley <DOT> com>
AuthorDate: Fri Feb 24 03:55:49 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 24 18:51:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=82a3b8ba

scripts: Resolve shellcheck errors

The action is failing at head, which makes it less than useful for
evaluating new changes.

e.g.
Error: ./scripts/rsync-generation/refresh-mirror.sh:44:2: error: Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors. [SC1105]
Error: ./scripts/rsync-generation/refresh-mirror.sh:44:3: error: Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors. [SC1105]
Error: ./scripts/bootstrap-prefix.sh:5:20: error: SIGKILL/SIGSTOP can not be trapped. [SC2173]
Error: ./scripts/bootstrap-prefix.sh:1669:19: error: Double quote array expansions to avoid re-splitting elements. [SC2068]
Error: ./scripts/bootstrap-prefix.sh:1964:19: error: Double quote array expansions to avoid re-splitting elements. [SC2068]
Error: ./scripts/bootstrap-prefix.sh:2286:19: error: Double quote array expansions to avoid re-splitting elements. [SC2068]
Error: ./scripts/bootstrap-prefix.sh:3194:11: error: -e doesn't work with globs. Use a for loop. [SC2144]

Signed-off-by: Peter Foley <pefoley2 <AT> pefoley.com>
Closes: https://github.com/gentoo/prefix/pull/19
Signed-off-by: Sam James <sam <AT> gentoo.org>

 scripts/bootstrap-prefix.sh                | 12 +++++++-----
 scripts/rsync-generation/refresh-mirror.sh |  2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 1ba5108ce1..ce939bfaf5 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -2,7 +2,7 @@
 # Copyright 2006-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-trap 'exit 1' TERM KILL INT QUIT ABRT
+trap 'exit 1' TERM INT QUIT ABRT
 
 # RAP (libc) mode is triggered on Linux kernel and glibc.
 is-rap() { [[ ${PREFIX_DISABLE_RAP} != "yes" && ${CHOST} = *linux-gnu* ]]; }
@@ -1666,7 +1666,7 @@ bootstrap_stage1() {
 }
 
 bootstrap_stage1_log() {
-	bootstrap_stage1 ${@} 2>&1 | tee -a ${ROOT}/stage1.log
+	bootstrap_stage1 "${@}" 2>&1 | tee -a ${ROOT}/stage1.log
 	local ret=${PIPESTATUS[0]}
 	[[ ${ret} == 0 ]] && touch ${ROOT}/.stage1-finished
 	return ${ret}
@@ -1961,7 +1961,7 @@ bootstrap_stage2() {
 }
 
 bootstrap_stage2_log() {
-	bootstrap_stage2 ${@} 2>&1 | tee -a ${ROOT}/stage2.log
+	bootstrap_stage2 "${@}" 2>&1 | tee -a ${ROOT}/stage2.log
 	local ret=${PIPESTATUS[0]}
 	[[ ${ret} == 0 ]] && touch "${ROOT}/.stage2-finished"
 	return ${ret}
@@ -2283,7 +2283,7 @@ bootstrap_stage3() {
 }
 
 bootstrap_stage3_log() {
-	bootstrap_stage3 ${@} 2>&1 | tee -a ${ROOT}/stage3.log
+	bootstrap_stage3 "${@}" 2>&1 | tee -a ${ROOT}/stage3.log
 	local ret=${PIPESTATUS[0]}
 	[[ ${ret} == 0 ]] && touch "${ROOT}/.stage3-finished"
 	return ${ret}
@@ -3191,7 +3191,9 @@ if [[ -z ${CHOST} ]]; then
 		case `uname -s` in
 			Linux)
 				plt="gnu"
-				[[ -e /lib/ld-musl-*.so.1 ]] && plt="musl"
+                                for f in /lib/ld-musl-*.so.1; do
+				  [[ -e "$f" ]] && plt="musl"
+                                done
 				sfx="unknown-linux-${plt}"
 				case `uname -m` in
 					ppc*)

diff --git a/scripts/rsync-generation/refresh-mirror.sh b/scripts/rsync-generation/refresh-mirror.sh
index 072c82e171..6e2baffaa4 100755
--- a/scripts/rsync-generation/refresh-mirror.sh
+++ b/scripts/rsync-generation/refresh-mirror.sh
@@ -41,7 +41,7 @@ else
 	}
 	# get a free filedescriptor in FD
 	exec {FD}>/tmp/rsync-master-busy
-	(((genandpush | tee -a "${LOGFILE}") {FD}>&1 1>&2 2>&${FD} \
+	( ( (genandpush | tee -a "${LOGFILE}") {FD}>&1 1>&2 2>&${FD} \
 	    | tee -a "${LOGFILE}") 2> /dev/null)
 	echo "generation done $(date)" >> ${LOGFILE}
 	exec {FD}>&-


             reply	other threads:[~2023-02-24 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 18:52 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-03  7:36 [gentoo-commits] repo/proj/prefix:master commit in: scripts/, scripts/rsync-generation/ Fabian Groffen
2024-03-30 12:26 Fabian Groffen

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=1677264698.82a3b8ba04a52268330028ea239a91bbdeb55890.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.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