distro-manifest-generator: enhance git repos detection 79/21679/2
authorStephane Desneux <stephane.desneux@iot.bzh>
Wed, 19 Jun 2019 16:16:07 +0000 (16:16 +0000)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 20 Jun 2019 14:16:37 +0000 (14:16 +0000)
commit8018e4a98fd6b82019939a2e107dbb89243b77c8
treef54c504e0a51ba2789a596f368156e92034cde60
parenta80c2f8e53139940c1e412364f058fea679ee7d2
distro-manifest-generator: enhance git repos detection

Following recent change 334a201 (#21619), it's now necessary to
explore the layers folder to find git repositories.

But when the build directory is a subfolder of $METADIR (repo folder),
'find' digs too deeply to find git repositories.

This patch adds some limits for 'find' to dig into subfolders:
* only find "top" git repos (no git submodules)
* limit the search depth to 2

Bug-AGL: SPEC-2450

Change-Id: Idd907737673d196cc8ba157a5c49492119efeb88
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
scripts/distro-manifest-generator.sh