From 34f3b084b13181baf1ba72c7eae574198feea16c Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Tue, 9 Aug 2022 14:08:11 +1000 Subject: [PATCH] Chore: Fix bashate warnings ./jenkins-init-scripts/disable-firewall.sh:19:1: E006 Line too long ./jjb-compare-xml.sh:28:1: E006 Line too long ./jjb-compare-xml.sh:59:1: E006 Line too long Issue-ID: RELENG-4358 Change-Id: I0ab6d09e9904ec1eb93ef9f8248ea29048c632f3 Signed-off-by: Anil Belur --- jenkins-init-scripts/disable-firewall.sh | 3 ++- jjb-compare-xml.sh | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jenkins-init-scripts/disable-firewall.sh b/jenkins-init-scripts/disable-firewall.sh index 79e1d3a8..b3efb22d 100755 --- a/jenkins-init-scripts/disable-firewall.sh +++ b/jenkins-init-scripts/disable-firewall.sh @@ -16,7 +16,8 @@ case "$OS" in systemctl stop firewalld ;; CentOS|RedHat) - if [ "$(facter operatingsystemrelease | cut -d '.' -f1)" -lt "7" ]; then + os_release_ver = "$(facter operatingsystemrelease | cut -d '.' -f1)" + if [ "${os_release_ver}" -lt "7" ]; then service iptables stop else systemctl stop firewalld diff --git a/jjb-compare-xml.sh b/jjb-compare-xml.sh index ee65d3a6..98ad4194 100755 --- a/jjb-compare-xml.sh +++ b/jjb-compare-xml.sh @@ -25,7 +25,8 @@ gittmp="$(mktemp -d)" git worktree add --detach "$gittmp" origin/master pushd "$gittmp" || exit echo "Generating expected XML." -jenkins-jobs test --recursive -o "$expected_xml_dir" "$gittmp":.jjb-test > /dev/null 2>&1 +jenkins-jobs test --recursive -o "$expected_xml_dir" \ + "$gittmp":.jjb-test > /dev/null 2>&1 popd || exit rm -r "$gittmp" @@ -56,6 +57,7 @@ echo "No double curly braces found." rm -rf "$test_dir" "$expected_xml_dir" if $fail; then - echo "WARN: Differences detected. Check above for jobs that have been changed." + echo "WARN: Differences detected." \ + "Check above for jobs that have been changed." exit 0 fi -- 2.16.6