build.sh 569 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. set -e
  3. echo "cp210x-programm 1.0:"
  4. if [ $UID -ne 0 ]
  5. then
  6. echo "Please run in sudo.."
  7. sleep 3
  8. exit
  9. fi
  10. echo ""
  11. sudo apt-get install libusb-dev libusb-1.0-0-dev libudev-dev -y
  12. echo
  13. git submodule init
  14. git submodule update
  15. echo -e "\e[93mMake PyUSB :\e[0m"
  16. cd pyusb
  17. ./setup.py build
  18. ./setup.py install
  19. echo ""
  20. echo -e "\e[93mMake cp210x-program :\e[0m"
  21. cd ..
  22. ./setup.py build
  23. ./setup.py install
  24. echo ""
  25. echo -e "\e[93mInstall rules:\e[0m"
  26. sudo cp -v doc/45-cp210x-programming.rules /etc/udev/rules
  27. echo ""
  28. echo -e "\e[93mDone.\e[0m"