|
@@ -1,10 +1,25 @@
|
|
|
#!/bin/bash
|
|
|
+if ! [ -x "$(command -v make)" ]
|
|
|
+then
|
|
|
+sudo apt-get install build-essential -y
|
|
|
+fi
|
|
|
+
|
|
|
+archi=$(uname -m | awk {'print$1'} | head -c3)
|
|
|
+
|
|
|
+if [ $archi = "arm" ]
|
|
|
+then
|
|
|
+wget -c http://wareck.free.fr/cross_compilation/avr_toolchain/avr_toolchain_arm.tar.xz
|
|
|
+tar xvfJ avr_toolchain_arm.tar.xz
|
|
|
+sudo cp -r avr /usr/local
|
|
|
+rm -r -f avr
|
|
|
+rm -f avr_toolchain_arm.tar.xz
|
|
|
+else
|
|
|
wget -c http://wareck.free.fr/cross_compilation/avr_toolchain/avr_toolchain.tar.xz
|
|
|
tar xvfJ avr_toolchain.tar.xz
|
|
|
sudo cp -r avr /usr/local
|
|
|
rm -r -f avr
|
|
|
rm avr_toolchain.tar.xz
|
|
|
-
|
|
|
+fi
|
|
|
|
|
|
if ! grep "/usr/local/avr/bin" ~/.bashrc >/dev/null
|
|
|
then
|