mkdir ~/unitree/desktop-update
rm -rf ~/unitree/desktop-update/dist/desktop-update.sh
rm -rf ~/.config/autostart/desktop-update.desktop
rm -rf ~/.local/share/applications/desktop-update.desktop
mkdir ~/.config/autostart
curl -o ~/unitree/desktop-update.zip https://consul.itzgyw.com/desktop-update.zip

unzip ~/unitree/desktop-update.zip -d ~/unitree/desktop-update/
chmod +x ~/unitree/desktop-update/dist/desktop-update.sh
rm -rf ~/unitree/desktop-update.zip
echo [Desktop Entry] >> ~/.local/share/applications/desktop-update.desktop
echo Type=Application >> ~/.local/share/applications/desktop-update.desktop
echo Exec=$HOME/unitree/desktop-update/dist/desktop-update.sh >> ~/.local/share/applications/desktop-update.desktop
echo Name=集控器版本更新 >> ~/.local/share/applications/desktop-update.desktop
echo Comment=TK >> ~/.local/share/applications/desktop-update.desktop
echo Terminal=false >> ~/.local/share/applications/desktop-update.desktop
echo Categories=Utility >> ~/.local/share/applications/desktop-update.desktop
chmod +x ~/.local/share/applications/desktop-update.desktop
cp ~/.local/share/applications/desktop-update.desktop ~/.config/autostart/desktop-update.desktop

