#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
cd `dirname $0`


git clone https://github.com/Nobu19800/BuildRobotArmController.git
sh BuildRobotArmController/Install.sh


wget http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz
tar -xf 3.2.4.tar.gz

mkdir RTCs
cd RTCs

git clone https://github.com/Nobu19800/RobotArmController.git
git clone https://github.com/Nobu19800/Adafruit_PWMServoDriver_Edison.git
git clone https://github.com/Nobu19800/CrawlerControllerPWM2.git

cd Adafruit_PWMServoDriver_Edison


cmake .
make
cp src/libadafruitpwmservodriveredison.so ../../bin/C++/adafruitpwmservodriveredison.so


cd ../CrawlerControllerPWM2


cmake .
make
cp src/libcrawlercontrollerpwm2.so ../../bin/C++/crawlercontrollerpwm2.so

cd ../RobotArmController


cmake .
make
cp src/libarmcontroller.so ../../bin/C++/armcontroller.so