pip install lz4 -i https://mirrors.aliyun.com/pypi/simple/
rm -rf ~/unitree/dist
rm -rf ~/.config/autostart/chaoquan.desktop
rm -rf ~/.local/share/applications/chaoquan.desktop
rm -rf ~/.config/autostart/fileserver.desktop
mkdir ~/.config/autostart
curl -o ~/unitree/unitree-v6.zip  https://consul.itzgyw.com/unitree-v6.zip

unzip ~/unitree/unitree-v6.zip -d ~/unitree


chmod +x ~/unitree/dist/application
chmod +x ~/unitree/dist/fileserver

echo 1.0.6 > ~/unitree/dist/version.txt

rm -rf ~/unitree/unitree-v6.zip
echo [Desktop Entry] >> ~/.local/share/applications/chaoquan.desktop
echo Type=Application >> ~/.local/share/applications/chaoquan.desktop
echo Exec=$HOME/unitree/dist/application >> ~/.local/share/applications/chaoquan.desktop
echo Name=犬类终结者 >> ~/.local/share/applications/chaoquan.desktop
echo Comment=Pyqt5 >> ~/.local/share/applications/chaoquan.desktop
echo Terminal=false >> ~/.local/share/applications/chaoquan.desktop
echo Categories=Utility >> ~/.local/share/applications/chaoquan.desktop

echo [Desktop Entry] >> ~/.config/autostart/fileserver.desktop
echo Type=Application >> ~/.config/autostart/fileserver.desktop
echo Exec=$HOME/unitree/dist/fileserver >> ~/.config/autostart/fileserver.desktop
echo Name=文件服务 >> ~/.config/autostart/fileserver.desktop
echo Comment=Pyqt5 >> ~/.config/autostart/fileserver.desktop
echo Terminal=false >> ~/.config/autostart/fileserver.desktop
echo Categories=Utility >> ~/.config/autostart/fileserver.desktop





chmod +x ~/.local/share/applications/chaoquan.desktop
chmod +x ~/.config/autostart/fileserver.desktop

cp ~/.local/share/applications/chaoquan.desktop ~/.config/autostart/chaoquan.desktop

cd ~/unitree/dist/go2_webrtc_connect && pip install -e .  -i https://mirrors.aliyun.com/pypi/simple/

python3 ~/unitree/dist/get_sys_path.py
rm -rf ~/unitree/dist/get_sys_path.py

