travis-fill-cache.sh 923 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env bash
  2. #
  3. # Download avr-gcc from Arduino and Microchip
  4. # Get also make 4 required to compile Optiboot
  5. #
  6. # path where tools are extracted
  7. LOCAL_TOOLS_DIR=$HOME/avr-tools
  8. # check if we are running by Travis-CI
  9. if [ -z "$TRAVIS_BUILD_DIR" ]; then
  10. echo "This script should be run by Travis-CI environment"
  11. echo "If you want to simulate Travis build, please set TRAVIS_BUILD_DIR"
  12. echo "environment variable to directory where your code lives"
  13. exit 1
  14. fi
  15. # include functions to download stuff
  16. . $TRAVIS_BUILD_DIR/scripts/travis-download.inc.sh
  17. # make directory for tools
  18. mkdir -p $LOCAL_TOOLS_DIR
  19. # get new make as Optiboot requires version >4.0
  20. download_make4
  21. # download Arduino versions
  22. for version in $(cat $TRAVIS_BUILD_DIR/docs/arduino-gcc-versions.md |grep -i "| yes |"|cut -f 2 -d '|'); do
  23. download_arduino $version
  24. done
  25. # download Microchip's AVR8 Toolchain
  26. download_avr_toolchain