]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
jjb: increase precision of job searches 22/head
authorKen Dreyer <kdreyer@redhat.com>
Fri, 14 Nov 2014 15:13:40 +0000 (08:13 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Fri, 14 Nov 2014 15:17:42 +0000 (08:17 -0700)
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

index dd46f68f603d8f97e57b088aa95ac642f6a071c1..b0b03ea600d773179fd353d68683851609a94309 100644 (file)
@@ -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"