Document how to use submodules for a simple build

Change-Id: I14bd9d05999fcad7d68f78707c5f06d1093a3fe1
diff --git a/dev-setup-git.sh b/dev-setup-git.sh
new file mode 100755
index 0000000..c03ee69
--- /dev/null
+++ b/dev-setup-git.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if git rev-parse &> /dev/null; then
+  echo "Error: run this from a new build directory, not from within a git repo"
+  exit 1
+fi
+
+# Configure the local.mk with path to the individual repositories
+CZECHLIGHT_BR2_EXT_LOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+cat > local.mk <<EOF
+DOCOPT_CPP_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/docopt.cpp
+SPDLOG_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/spdlog
+LIBYANG_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/libyang
+SYSREPO_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/sysrepo
+LIBNETCONF2_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/libnetconf2
+NETOPEER2_KEYSTORED_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/Netopeer2
+NETOPEER2_SERVER_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/Netopeer2
+NETOPEER2_CLI_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo/submodules/Netopeer2
+CLA_SYSREPO_OVERRIDE_SRCDIR = ${CZECHLIGHT_BR2_EXT_LOC}/submodules/cla-sysrepo
+EOF
+
+# We have to run make first so that the proxy Makefile is created and the BR2_EXTERNAL is remembered
+make O=$PWD -C ${CZECHLIGHT_BR2_EXT_LOC}/submodules/buildroot BR2_EXTERNAL=${CZECHLIGHT_BR2_EXT_LOC} outputmakefile