Chore: Fix bashate warnings 66/70466/2
authorAnil Belur <abelur@linuxfoundation.org>
Tue, 9 Aug 2022 04:08:11 +0000 (14:08 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 18 Aug 2022 22:09:38 +0000 (08:09 +1000)
./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 <abelur@linuxfoundation.org>
jenkins-init-scripts/disable-firewall.sh
jjb-compare-xml.sh

index 79e1d3a..b3efb22 100755 (executable)
@@ -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
index ee65d3a..98ad419 100755 (executable)
@@ -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