]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - build/prepare_infrastructure
Make compilation of barcol and barcam conditional
[eurobot/public.git] / build / prepare_infrastructure
index a1fab2a16d31730e0fb16b205d068c6b20b94540..dade408d41f238474b09323bf2e8024ed14eec51 100755 (executable)
@@ -1,15 +1,42 @@
-#!/bin/sh
+#!/bin/bash
 
-if [ ! -d _infrastructure/h8300-boot/_darcs ]; then
-    [ -x "`which darcs`" ] && darcs get rtime.felk.cvut.cz:/var/repos/h8300-boot --repo-name=_infrastructure/h8300-boot || exit 1
-fi
+set -e
 
-for i in h8eurobot/ h8mirosot/ linux/ ppc/; do
-       make -C $i default-config
-done
 
-# for i in *; do
-#     [ -d $i -a $i != h8300-boot ] && ln -sf ../../$i h8300-boot/app
-# done
+cd `dirname $0`
+export MYDIR=$PWD
+
+########################################
+# Update submodules
+########################################
+cd `git rev-parse --show-cdup`
+
+update_submodule() {
+    path=$1
+    git submodule init "$path"
+    if ! git submodule update -- "$path"; then
+       git config --remove-section "submodule.$path"
+       git checkout "$path"
+    else
+       ( cd $path && git submodule init && git submodule update ) || exit 1
+    fi
+}
+
+update_submodule src/sysless
+update_submodule src/orte
+update_submodule src/ulut
+update_submodule robot-root
+update_submodule src/v4l/v4l-utils
+#update_submodule src/pxmc
+#update_submodule src/linux-shark
+
+
+########################################
+# Default config
+########################################
+cd $MYDIR
+for i in h8eurobot/ h8mirosot/ h8canusb/ host/ ppc/ lpceurobot/; do
+       echo "make default-config"
+       make -C $i default-config | grep -v default-config-pass
+done
 
-# echo "You can find all your applications in h8300-boot/app"