#!/bin/bash echo -e "$(tput setaf 10)AVR Toolchain builder prerequises install :$(tput setaf 7)\n" sudo apt-get install wget bzip2 texinfo flex babeltrace python expat bison tk-dev tcl-dev pixz pv libtool-bin -y sudo apt-get install libelf-dev libusb-1.0-0-dev libusb-dev libftdi-dev libftdi1-dev libhidapi-dev -y if ! [ -x "$(command -v swig)" ] then if ! [ -x "$(command -v pcre-config)" ] then sudo apt-get install libpcre++-dev -y fi wget -c http://wareck.free.fr/cross_compilation/avr_toolchain/swig-3.0.12.tar.xz tar xvfJ swig-3.0.12.tar.xz cd swig-3.0.12 ./autogen.sh ./configure make sudo make install cd fi if ! grep "/usr/local/avr/bin" ~/.bashrc >/dev/null then echo "export PATH=XXXXPATH::/usr/local/avr/bin" >> ~/.bashrc sed -i -e "s/XXXX/$/g" ~/.bashrc source ~/.bashrc fi touch .prereq