prerequise.sh 812 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. echo -e "$(tput setaf 10)AVR Toolchain builder prerequises install :$(tput setaf 7)\n"
  3. sudo apt-get install wget bzip2 texinfo flex babeltrace python expat bison tk-dev tcl-dev pixz pv libtool-bin -y
  4. sudo apt-get install libelf-dev libusb-1.0-0-dev libusb-dev libftdi-dev libftdi1-dev libhidapi-dev -y
  5. if ! [ -x "$(command -v swig)" ]
  6. then
  7. if ! [ -x "$(command -v pcre-config)" ]
  8. then
  9. sudo apt-get install libpcre++-dev -y
  10. fi
  11. wget -c http://wareck.free.fr/cross_compilation/avr_toolchain/swig-3.0.12.tar.xz
  12. tar xvfJ swig-3.0.12.tar.xz
  13. cd swig-3.0.12
  14. ./autogen.sh
  15. ./configure
  16. make
  17. sudo make install
  18. cd
  19. fi
  20. if ! grep "/usr/local/avr/bin" ~/.bashrc >/dev/null
  21. then
  22. echo "export PATH=XXXXPATH::/usr/local/avr/bin" >> ~/.bashrc
  23. sed -i -e "s/XXXX/$/g" ~/.bashrc
  24. source ~/.bashrc
  25. fi
  26. touch .prereq