summaryrefslogtreecommitdiff
path: root/MakeRelease.job
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2020-04-27 14:15:51 +0100
committerDavid Spickett <david.spickett@linaro.org>2020-04-30 09:56:12 +0100
commit5e5cdf3372932f00151ceff9388165201ebe5106 (patch)
tree80f8bf9ec3b1ec4605d4348f85e60eac258892ed /MakeRelease.job
parent49aa56fa328bd43ea470c1c3cda41edbd970a40f (diff)
Shellcheck fixes round 4
Fixes for: https://github.com/koalaman/shellcheck/wiki/SC2207 Are using the bash 4.x 'mapfile' syntax where the input to the array is seperated by newlines. If it's separated by spaces we use 'read' instead. Support for selecting libc in MakeRelease.job was removed in 3fa23da28ad73d0fe4b512c4aab269b5280a6650. So remove references to "libc" which were expanding to nothing anyway. In tcwg-llvm-common.sh PROJECTS->BRANCHED_PROJECTS is not strictly needed. However shellcheck can't tell that the local PROJECTS in this file is different from the PROJECTS in tcwg-llvm-build.sh. Change-Id: Ie55968e3bf185d0bd5795fe48014636cda1009bc
Diffstat (limited to 'MakeRelease.job')
-rwxr-xr-xMakeRelease.job22
1 files changed, 12 insertions, 10 deletions
diff --git a/MakeRelease.job b/MakeRelease.job
index 017189a8..46e023ee 100755
--- a/MakeRelease.job
+++ b/MakeRelease.job
@@ -100,7 +100,6 @@ else
rsh="ssh $fileserver"
fi
-shared="/home/buildslave/workspace/shared/"
user_snapshots="${user_workspace}/snapshots"
if test -e ${user_workspace}; then
@@ -169,10 +168,10 @@ manifests=()
tarballs=()
# Canadian cross builds require a Linux hosted cross compiler first
if test x"${canadian}" = x"true"; then
- $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts ${user_workspace}/artifacts1.txt ${update} --release ${release} ${srcs} $target_opt --build all ${libc} ${extra} --tarbin >> ${logfile}
+ $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts ${user_workspace}/artifacts1.txt ${update} --release ${release} ${srcs} $target_opt --build all ${extra} --tarbin >> ${logfile}
abe_ret=$?
host="--host i686-w64-mingw32"
- manifests+=($(read_var ${user_workspace}/artifacts1.txt manifest))
+ manifests+=( "$(read_var ${user_workspace}/artifacts1.txt manifest)" )
else
host=""
fi
@@ -182,19 +181,22 @@ fi
# build the mingw32 compiler only if the previous cross-compiler build was
# successful.
if test ${abe_ret} -eq 0; then
- $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts ${user_workspace}/artifacts2.txt ${update} --release ${release} --tarbin ${srcs} $target_opt ${host} --build all ${libc} ${extra} >> ${logfile}
+ $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts ${user_workspace}/artifacts2.txt ${update} --release ${release} --tarbin ${srcs} $target_opt ${host} --build all ${extra} >> ${logfile}
abe_ret=$?
- manifests+=($(read_var ${user_workspace}/artifacts2.txt manifest))
+ manifests+=( "$(read_var ${user_workspace}/artifacts2.txt manifest)" )
fi
if test x"${canadian}" = x"true"; then
# take the toolchain, sysroot and runtime tarballs from the linux build
- tarballs+=($(read_var ${user_workspace}/artifacts1.txt '\(toolchain\|sysroot\|runtime\)\(_asc\)\?' ))
+ mapfile -t -O "${#tarballs[@]}" tarballs < <( \
+ read_var ${user_workspace}/artifacts1.txt '\(toolchain\|sysroot\|runtime\)\(_asc\)\?' )
# and just the toolchain from the mingw build
- tarballs+=($(read_var ${user_workspace}/artifacts2.txt 'toolchain\(_asc\)\?' ))
+ mapfile -t -O "${#tarballs[@]}" tarballs < <( \
+ read_var ${user_workspace}/artifacts2.txt 'toolchain\(_asc\)\?' )
else
- tarballs+=($(read_var ${user_workspace}/artifacts2.txt '\(toolchain\|sysroot\|runtime\)\(_asc\)\?' ))
+ mapfile -t -O "${#tarballs[@]}" tarballs < <( \
+ read_var ${user_workspace}/artifacts2.txt '\(toolchain\|sysroot\|runtime\)\(_asc\)\?' )
fi
# MakeRelease.job doesn't require an input gcc_src parameter (it'll invoke ABE
@@ -237,7 +239,7 @@ buildid=`printf '%04d' ${buildnumber}`
binaries="$artifacts_top/binaries/${gcc_release}-${series_date}-${buildid}/${target}"
logs="$artifacts_top/logs/${gcc_release}-${series_date}-${buildid}/${target}"
-if [ "x${binariesdir}" != "x"] && \
+if [ "x${binariesdir}" != "x" ] && \
[ "x${binariesdir}" != "x${binaries}" ]; then
echo "WARNING: Provided binaries dirname does not match with what was computed"
echo "Provided: ${binariesdir}"
@@ -245,7 +247,7 @@ if [ "x${binariesdir}" != "x"] && \
binaries=${binariesdir}
fi
-if [ "x${logsdir}" != "x"] && \
+if [ "x${logsdir}" != "x" ] && \
[ "x${logsdir}" != "x${logs}" ]; then
echo "WARNING: Provided logs dirname does not match with what was computed"
echo "Provided: ${logsdir}"