/ install.sh
install.sh
1 #!/usr/bin/env bash 2 3 # we need bash 4 for associative arrays 4 if [ "${BASH_VERSION%%[^0-9]*}" -lt "4" ]; then 5 echo "BASH VERSION < 4: ${BASH_VERSION}" >&2 6 exit 1 7 fi 8 9 #This condition is to avoid reruning install when build argument is passed 10 if [[ $# -eq 0 ]] ; then 11 # define colors 12 GRAY='\033[1;30m'; RED='\033[0;31m'; LRED='\033[1;31m'; GREEN='\033[0;32m'; LGREEN='\033[1;32m'; ORANGE='\033[0;33m'; YELLOW='\033[1;33m'; BLUE='\033[0;34m'; LBLUE='\033[1;34m'; PURPLE='\033[0;35m'; LPURPLE='\033[1;35m'; CYAN='\033[0;36m'; LCYAN='\033[1;36m'; LGRAY='\033[0;37m'; WHITE='\033[1;37m'; 13 fi 14 15 # Install dependencies 16 sudo apt-get install libudev-dev libusb-1.0 17 sudo apt-get install -y gettext 18 pip install -r requirements.txt 19 pip install circuitpython-build-tools Sphinx sphinx-rtd-theme 20 pip install --force-reinstall pylint==1.9.2