update_code.sh 631 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # Copyright: 2016-2020 www.corvin.cn
  3. # Author: corvin
  4. # Description: 用来更新panda代码,保持代码与服务器上最新代码同步.
  5. # 更新好代码后,直接编译所有代码.
  6. # History:
  7. # 20200717:init this code.
  8. green="\e[32;1m"
  9. red="\e[31m"
  10. normal="\e[0m"
  11. echo -e "\n"
  12. echo -e "${green}>>> 1: 开始从服务器更新代码${normal}"
  13. git pull origin master
  14. echo -e "${green}更新代码完成,准备编译代码${normal}"
  15. echo -e "\n"
  16. sleep 3
  17. echo -e "${green}>>> 2:开始编译代码${normal}"
  18. catkin_make
  19. echo -e "${green}编译代码完成,现在可以运行代码${normal}"
  20. echo -e "\n"
  21. exit 0