/
install
executable file
·30 lines (25 loc) · 982 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# http://docs.platformio.org/en/latest/installation.html
# http://www.russelldavis.org/2015/08/01/platformio-on-the-raspberry-pi/
if [ $# -ne 0 ] || [[ $1 == "--help" ]] || [ $(id -u) -ne 0 ];then
/show/messagebox "$0"
/show/info "[beta] [platformio] [install]"
/show/usageDescription "Install platformio"
/show/usage "$0"
else
/show/description "[PLATFORMIO] Install"
/show/listecho "This script is inspired by Russell Davis Tutorial" $PICOLOR
/show/listecho "http://www.russelldavis.org/2015/08/01/platformio-on-the-raspberry-pi/" $PICOLOR
if [ ! -f "/usr/local/bin/platformio" ];then
/show/listecho "Install dependencies" $OK
# Dependencies
/system/install libmpc-dev
/system/install libelf1
/system/install libftdi1
/show/listecho "Install platformio" $OK
python -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
else
/do/platformio/update
fi
/system/makedir /user/arduino
fi