mkdir build
cd build

mkdir -p movingliner
cd movingliner
cmake ../../movingliner
make -j4
mkdir /home/pi/bin
cp ./movingliner /home/pi/bin
echo beging build shuttercali

cd ../

mkdir -p shuttercali
cd shuttercali
cmake ../../shuttercali/project/LocationCali
make -j4 
cp ./shutter_calibrate /home/pi/bin

cd ../
mkdir -p TemperatureControler
cd TemperatureControler
cmake ../../TemperatureControler/project
make
cp ./TemperatureControler /home/pi/bin
mkdir -p /home/data/Setting
cp  ../../TemperatureControler/project/Constant_Temperature_Config.json /home/data/Setting
cd ../

mkdir -p console
cd console
cmake ../../calibration_console
make -j4
cp ./ocean_optics_calibration_console /home/pi/bin
cd ../
sudo killall Mywathdog.sh
sudo killall TowerOptoSifAndSpectral
cd ../../
cp -r ./html/* /var/www/html
chmod +x /var/www/html/php/*.sh
cd ./build
cp TowerOptoSifAndSpectral /home/pi/bin
cd ../
cp ./root/Mywathdog.sh /root
cp ./root/start.sh /root
chmod +x /root/start.sh
mkdir -p /home/data
cd ../
#rm -rf ./TowerOptoSifAndSpectral
cd /root/filebrew
chmod +x ./filebrowser
./filebrowser config set -a 0.0.0.0
./filebrowser config set -r /home/data
sudo apt-get install -y timedatectl
timedatectl set-timezone Asia/Shanghai
date -R
sudo hwclock -w -f /dev/rtc0
#sudo reboot
#tc
