From 9303ecd9b756333a2b33a3f8437973901db47967 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Fri, 14 Nov 2014 08:13:40 -0700 Subject: [PATCH] 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. --- jjb/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- 2.39.5