set -e
-function darcs_import()
-{
- [ -x "`which darcs`" ] || return
- REPODIR=$1
- ORIGIN=$2
- if [ ! -d ${REPODIR}/_darcs ]; then
- darcs get ${ORIGIN} --repo-name=${REPODIR}
+
+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 ${REPODIR}; darcs pull --all ${ORIGIN})
+ ( cd $path && git submodule init && git submodule update ) || exit 1
fi
}
-cd `dirname $0`
-
-if [ ! -d _infrastructure/h8300-boot ]; then
- git clone git://rtime.felk.cvut.cz/sysless-h8300 _infrastructure/h8300-boot
- (cd _infrastructure/h8300-boot; git submodule init; git submodule update; common/linkarch)
-else
- (cd _infrastructure/h8300-boot; git pull; git submodule update)
-fi
-
-darcs_import ../src/pxmc rtime.felk.cvut.cz:/var/repos/pxmc
-
-for i in h8eurobot/ h8mirosot/ h8canusb/ linux/ ppc/; do
- make -C $i default-config
+update_submodule src/sysless
+update_submodule src/orte
+update_submodule src/ulan-app
+update_submodule src/ulut
+update_submodule robot-root
+update_submodule src/v4l/v4l-utils
+update_submodule src/pxmc
+update_submodule src/3rdparty/libusb && ( cd src/3rdparty/libusb && ./autogen.sh && make distclean )
+#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
-
-# for i in *; do
-# [ -d $i -a $i != h8300-boot ] && ln -sf ../../$i h8300-boot/app
-# done
-
-# echo "You can find all your applications in h8300-boot/app"