diff options
Diffstat (limited to 'update_jdn.sh')
-rwxr-xr-x | update_jdn.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/update_jdn.sh b/update_jdn.sh index 2a310fd8..41fd8426 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -82,10 +82,11 @@ explain "Jenkins jobs updated." # # crappy tests for checking that jenkins-job-builder works correctly # -DEFINED_CHROOT_TRIGGERS=$(grep _trigger: chroot-tests.yaml|wc -l) +#wc -m counts one byte too many, so we substract one +let DEFINED_MY_TRIGGERS=$(grep my_trigger: *.yaml|wc -l)+(grep my_trigger: *.yaml|grep , |xargs echo | sed 's/[^,]//g'| wc -m)-1 DEFINED_DI_TRIGGERS=$(grep "defaults: d-i-manual-html" d-i.yaml|wc -l) -let DEFINED_TRIGGERS=DEFINED_CHROOT_TRIGGERS+DEFINED_DI_TRIGGERS+1 # add 1 as "wc -m" also counts one extra... -let CONFIGURED_TRIGGERS=$(grep \<childProjects /var/lib/jenkins/jobs/*/config.xml|wc -l)+$(grep \<childProjects /var/lib/jenkins/jobs/*/config.xml |grep , |xargs echo | sed 's/[^,]//g'| wc -m) +let DEFINED_TRIGGERS=DEFINED_MY_TRIGGERS+DEFINED_DI_TRIGGERS +let CONFIGURED_TRIGGERS=$(grep \<childProjects /var/lib/jenkins/jobs/*/config.xml|wc -l)+$(grep \<childProjects /var/lib/jenkins/jobs/*/config.xml |grep , |xargs echo | sed 's/[^,]//g'| wc -m)-1 if [ "$DEFINED_TRIGGERS" != "$CONFIGURED_TRIGGERS" ] ; then figlet Warning explain "Number of defined triggers ($DEFINED_TRIGGERS) differs from currently configured triggers ($CONFIGURED_TRIGGERS), please investigate." |