core/br2-external: validate even more
authorYann E. MORIN <yann.morin.1998@free.fr>
Fri, 14 Oct 2016 14:39:16 +0000 (16:39 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 16 Oct 2016 11:01:02 +0000 (13:01 +0200)
A br2-external tree must provide external.mk and Config.in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/scripts/br2-external

index b2bff644b63a25d68f3a40edf1f4b086f6bc1052..1a0c743462e737144cf3e31bdad2d0a3900d89ab 100755 (executable)
@@ -67,6 +67,12 @@ do_validate() {
     if [ ! -r "${br2_ext}" -o ! -x "${br2_ext}" ]; then
         error "'%s': permission denied\n" "${br2_ext}"
     fi
+    if [ ! -f "${br2_ext}/external.mk" ]; then
+        error "'%s/external.mk': no such file or directory\n" "${br2_ext}"
+    fi
+    if [ ! -f "${br2_ext}/Config.in" ]; then
+        error "'%s/Config.in': no such file or directory\n" "${br2_ext}"
+    fi
 
     BR2_EXT="$(cd "${br2_ext}"; pwd -P )"
 }