X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjjb-verify-job.sh;h=f38685f22bbd77bed1c81da38d7c785e1f23fa26;hb=6eefde1f463638b5021c2ec96eb67a017d379f1f;hp=cc0aa0b997f8873e62d6744c2ac0a462dae9f1bc;hpb=0cd4f5d8c5fc52e167cd19ab00bddec4f7f0c190;p=releng%2Fglobal-jjb.git diff --git a/shell/jjb-verify-job.sh b/shell/jjb-verify-job.sh index cc0aa0b9..f38685f2 100644 --- a/shell/jjb-verify-job.sh +++ b/shell/jjb-verify-job.sh @@ -1,5 +1,5 @@ #!/bin/bash -# @License EPL-1.0 +# SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. # @@ -21,11 +21,10 @@ jenkins-jobs -l DEBUG test --recursive -o archives/job-configs jjb/ pushd archives/job-configs for letter in {a..z} do - ls "$letter"* > /dev/null 2>&1 - if [[ "$?" -eq 0 ]] + if [[ $(ls "$letter"* > /dev/null 2>&1) -eq 0 ]] then mkdir "$letter" - find . -type f -maxdepth 1 -name "$letter*" -exec mv {} "$letter" \; + find . -maxdepth 1 -type f -name "$letter*" -exec mv {} "$letter" \; fi done popd