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.

34 lines
1.5 KiB

  1. #!/bin/bash
  2. _qmk_install_prepare() {
  3. echo "This script will make a USE change in order to ensure that that QMK works on your system."
  4. echo "All changes will be sent to the file /etc/portage/package.use/qmkfirmware -- please review it, and read Portage's output carefully before installing any packages on your system."
  5. echo "You will also need to ensure that your kernel is compiled with support for the microcontroller that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki."
  6. read -p "Proceed? [y/N] " res
  7. case $res in
  8. [Yy]*)
  9. return 0;;
  10. *)
  11. return 1;;
  12. esac
  13. }
  14. _qmk_install() {
  15. echo "Installing dependencies"
  16. sudo touch /etc/portage/package.use/qmkfirmware
  17. # tee is used here since sudo doesn't apply to >>
  18. echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null
  19. sudo emerge -auN sys-devel/gcc
  20. sudo emerge -au --noreplace \
  21. app-arch/unzip app-arch/zip net-misc/wget sys-devel/clang \
  22. sys-devel/crossdev \>=dev-lang/python-3.7 dev-embedded/avrdude \
  23. dev-embedded/dfu-programmer app-mobilephone/dfu-util sys-apps/hwloc \
  24. dev-libs/hidapi
  25. sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
  26. sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
  27. python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
  28. }