avr_setup.sh 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. # This script will attempt to setup the Linux dependencies for compiling QMK/TMK
  3. # This could probably go much lower, but since we are including an Arch vagrant,
  4. # making it the first match makes sense
  5. if [[ -n "$(type -P pacman )" ]]; then
  6. # Arch linux and derivatives like Apricity
  7. # Future improvements:
  8. # Allow user to speed up package installs using powerpill/wget tweaks
  9. # Always run the pacman mirror update script if possible when vagrant comes up
  10. # This will ensure that users never get stalled on a horribly slow mirror
  11. pacman -Syyu --needed --noconfirm
  12. pacman -S --needed --noconfirm base-devel avr-gcc avr-binutils avr-libc dfu-util
  13. elif [[ -n "$(type -P apt-get)" ]]; then
  14. # Debian and derivatives
  15. apt-get update -y && apt-get upgrade -y
  16. apt-get install -y build-essential gcc unzip wget zip gcc-avr binutils-avr avr-libc
  17. elif [[ -n "$(type -P yum)" ]]; then
  18. # Fedora, CentOS or RHEL and derivatives
  19. yum -y makecache && yum -y update
  20. yum -y install gcc glibc-headers kernel-devel kernel-headers make perl git wget
  21. elif [[ -n "$(type -P zypper)" ]]; then
  22. # openSUSE
  23. zypper refresh --non-interactive && zypper update --non-interactive
  24. zypper --non-interactive install git make gcc kernel-devel patch wget
  25. fi