prerequise.sh 709 B

123456789101112131415161718192021222324252627
  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. if ! [ -x "$(command -v swig)" ]
  5. then
  6. if ! [ -x "$(command -v pcre-config)" ]
  7. then
  8. sudo apt-get install libpcre++-dev -y
  9. fi
  10. wget -c http://wareck.free.fr/cross_compilation/avr_toolchain/swig-3.0.12.tar.xz
  11. tar xvfJ swig-3.0.12.tar.xz
  12. cd swig-3.0.12
  13. ./autogen.sh
  14. ./configure
  15. make
  16. sudo make install
  17. cd
  18. fi
  19. if ! grep "/usr/local/avr/bin" ~/.bashrc >/dev/null
  20. then
  21. echo "export PATH=XXXXPATH::/usr/local/avr/bin" >> ~/.bashrc
  22. sed -i -e "s/XXXX/$/g" ~/.bashrc
  23. source ~/.bashrc
  24. fi
  25. touch .prereq