ino-install.sh 1.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/bash
#if [ ! ino_loc="$(type -p ino)" || [ -z "ino" ]]; then
if ! type ino > /dev/null; then
    # caso o comando 'ino' esteja disponível
    # echo "I need the 'ino' command line tool (inotool.org) to be installed";
    sudo apt-get update
    sudo apt-get install python-pip arduino;
    echo "Finding pip2 binary..";
    PIP2=`dpkg -L python-pip | grep /usr/bin/pip | tail -1`;
    echo "Got it! PIP2=$PIP2";
    sudo $PIP2 install -v ino;
    ino --version
else
    echo "[OK] Ino Tool exists.";
fi

17
ino list-models > /dev/null
18 19 20 21

if [ ! $? -eq 0 ]; then
    printf "\nIno Tool (http://inotool.org/) seems not be working with your system's Arduino instalation. Here is what you can try:\n"
    printf "\n    * Specify a new Arduino toolchain (for instance, downloaded at https://www.arduino.cc/en/Main/Software) with:\n"
22
    printf "\n       $ make firmware ARDUINO=~/Downloads/arduino-1.0.5\n"
23 24
    printf "\n       BEWARE: Ino Tool only support versions 1.0.x of the Arduino toolchain!\n"
    printf "\n    * Use the Arturo tool (http://32bits.io/Arturo/):\n"
25 26
    printf "\n       $ make firmware USE=ano\n"
    printf "        $ make firmware USE=ano ARDUINO=~/Downloads/arduino-1.6.5\n"
27 28 29 30 31
    printf "\n       PS: Arturo DOES support newer versions of the Arduino toolchain.\n"
    printf "\n    * Simply use de Arduino IDE to compile meteorolog/meteorolog.ino and upload the firmware yourself.\n"
else
    echo "[OK] Ino Tools seems to work."
fi