From: Ken Dreyer Date: Fri, 14 Nov 2014 15:13:40 +0000 (-0700) Subject: jjb: increase precision of job searches X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9303ecd9b756333a2b33a3f8437973901db47967;p=ceph-build.git jjb: increase precision of job searches The "for `ls .` ... -d subdirectory" logic was examining every entry at the top-level of the workspace, both files and directories. The files entries were useless since they would never contain subdirectories. Use "find" instead to only locate directories at the top level. The purpose of this change is to make the verbose output (with set -x) easier to read, and make it easier to spot errors in the future. --- diff --git a/jjb/config/config b/jjb/config/config index dd46f68f..b0b03ea6 100644 --- a/jjb/config/config +++ b/jjb/config/config @@ -25,7 +25,7 @@ fi # Test every definition if available in the current repository and update the jobs # if they do define one (they should always define their definitions) -for dir in `ls .`; do +for dir in `find . -maxdepth 1 -path ./.git -prune -o -type d -print`; do definitions_dir="$dir/config/definitions" if [ -d "$definitions_dir" ]; then echo "found definitions directory: $definitions_dir"