You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
721 B

  1. #!/bin/sh
  2. packages=$(cat <<EOF
  3. git \
  4. wget \
  5. gmake \
  6. gcc \
  7. zip \
  8. unzip \
  9. avr-binutils \
  10. avr-gcc \
  11. avr-libc \
  12. dfu-programmer \
  13. dfu-util \
  14. avrdude \
  15. arm-none-eabi-gcc \
  16. arm-none-eabi-binutils \
  17. arm-none-eabi-newlib \
  18. diffutils \
  19. python3
  20. EOF
  21. )
  22. util_dir=$(dirname "$0")
  23. if [ $(id -u) = 0 ]; then
  24. pkg update
  25. pkg install -y ${packages}
  26. echo ""
  27. echo "Re-run the setup as your normal user to install the qmk python dependencies"
  28. exit 1
  29. else
  30. if command -v sudo > /dev/null 2>&1; then
  31. sudo pkg update
  32. sudo pkg install -y ${packages}
  33. else
  34. echo "Make sure you run setup as root first to install base OS dependencies..."
  35. echo ""
  36. fi
  37. python3 -m pip install --user -r ${util_dir}/../requirements.txt
  38. fi