summaryrefslogtreecommitdiff
path: root/jenkins.sh
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2020-04-23 11:10:08 +0100
committerDavid Spickett <david.spickett@linaro.org>2020-04-28 13:13:46 +0000
commit6273fc478b9c95c4ae8d42c9021f9428b1d43811 (patch)
tree9564b82cc9e90dc4886835d30cbdea35453b1f53 /jenkins.sh
parent0ce72e970e6cbb6c39469b503cdf65510f4f99d8 (diff)
Shellcheck fixes round 3
Now using the version that's present in the bionic images. Meaning we have more warnings but can also set the minimum level to ignore a lot of them. Fix the check for whether shellcheck supports --severity. (we have pipefail on, but we expect shellcheck to fail in this case) Change-Id: I296b8554591b7d327c75393e3924184abc6512b7
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-xjenkins.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/jenkins.sh b/jenkins.sh
index 4be4bd04..33f103af 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -239,7 +239,7 @@ user_snapshots="${user_workspace}/snapshots"
arch="$(uname -m)"
-if [ x"$logserver" = x"" -a x"$logname" != x"" ]; then
+if [ x"$logserver" = x"" ] && [ x"$logname" != x"" ]; then
echo "ERROR: \$logname is not provided, but \$logserver is set to $logserver"
exit 1
fi
@@ -418,12 +418,13 @@ $CONFIG_SHELL ${abe_dir}/configure --with-local-snapshots=${user_snapshots} --wi
# load commonly used varibles set by configure
if test -e "${PWD}/host.conf"; then
+ # shellcheck disable=SC1090
. "${PWD}/host.conf"
fi
# We used to delete *.sum files, but this should not be necessary. This
# check is transitional, and will be removed later.
-if [ ! -z "$(find ${user_workspace} -name \*.sum)" ]; then
+if [ -n "$(find ${user_workspace} -name \*.sum)" ]; then
echo "Found *.sum files, but workspace should be empty!"
exit 1
fi
@@ -527,14 +528,14 @@ fi
if test x"${logserver}" != x"" ; then
if test x"${tarsrc}" = xtrue -a x"${release}" != x; then
allfiles="$(ls ${user_snapshots}/*${release}*.xz)"
- srcfiles="$(echo ${allfiles} | egrep -v "arm|aarch")"
+ srcfiles="$(echo ${allfiles} | grep -E -v "arm|aarch")"
scp $logopts ${srcfiles} ${logserver}:/home/abe/var/snapshots/ || status=1
rm -f ${srcfiles} || status=1
fi
if test x"${tarbin}" = xtrue -a x"${release}" != x; then
allfiles="$(ls ${user_snapshots}/*${release}*.xz)"
- binfiles="$(echo ${allfiles} | egrep "arm|aarch")"
+ binfiles="$(echo ${allfiles} | grep -E "arm|aarch")"
scp $logopts ${binfiles} ${logserver}:/work/space/binaries/ || status=1
rm -f ${binfiles} || status=1
fi