#!/bin/bash

curdir=$(cd "$(dirname "$0")";pwd)


rm -rf /root/bin-AOI/cnt_net/workspace/LOG

#do3
cd $curdir
tar -Jxvf do3thinklib.tar.xz -C /lib
rm -f do3thinklib.tar.xz

#dahua
cd $curdir
tar -Jxvf dahualib.tar.xz -C /lib
rm -f dahualib.tar.xz

#libBSYV
cd $curdir
mv -f libBSYV.so.1.0.0 /lib

#deb
cd $curdir/deb
dpkg -i libnet1_1.1.6+dfsg-3.1build3_amd64.deb
dpkg -i arping_2.22-1_amd64.deb
rm -rf $curdir/deb

#tslib
cd $curdir
tar -Jxvf $curdir/tslib122_timer.tar.xz -C /lib
mv /lib/ts_calibrate /root/bin-AOI/tsc
mv /lib/ts.conf /etc/
rm -f $curdir/tslib122_timer.tar.xz

#Plugins_Cameras -> Plugins
cd $curdir
mkdir Plugins
rm -rf Plugins/Cameras/
mv Plugins_Cameras Plugins/Cameras

sync

#finaly
cd $curdir
mv dprofile /root/.profile

