qmk_sweep_skeletyl/util/install/gentoo.sh
Zach White 7a25dcacff
New command: qmk console (#12828)
* stash poc

* stash

* tidy up implementation

* Tidy up slightly for review

* Tidy up slightly for review

* Bodge environment to make tests pass

* Refactor away from asyncio due to windows issues

* Filter devices

* align vid/pid printing

* Add hidapi to the installers

* start preparing for multiple hid_listeners

* udev rules for hid_listen

* refactor to move closer to end state

* very basic implementation of the threaded model

* refactor how vid/pid/index are supplied and parsed

* windows improvements

* read the report directly when usage page isn't available

* add per-device colors, the choice to show names or numbers, and refactor

* add timestamps

* Add support for showing bootloaders

* tweak the color for bootloaders

* Align bootloader disconnect with connect color

* add support for showing all bootloaders

* fix the pyusb check

* tweaks

* fix exception

* hide a stack trace behind -v

* add --no-bootloaders option

* add documentation for qmk console

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

* pyformat

* clean up and flesh out KNOWN_BOOTLOADERS

Co-authored-by: zvecr <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-05-08 20:56:07 -07:00

34 lines
1.5 KiB
Bash
Executable file

#!/bin/bash
_qmk_install_prepare() {
echo "This script will make a USE change in order to ensure that that QMK works on your system."
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."
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."
read -p "Proceed? [y/N] " res
case $res in
[Yy]*)
return 0;;
*)
return 1;;
esac
}
_qmk_install() {
echo "Installing dependencies"
sudo touch /etc/portage/package.use/qmkfirmware
# tee is used here since sudo doesn't apply to >>
echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null
sudo emerge -auN sys-devel/gcc
sudo emerge -au --noreplace \
app-arch/unzip app-arch/zip net-misc/wget sys-devel/clang \
sys-devel/crossdev \>=dev-lang/python-3.7 dev-embedded/avrdude \
dev-embedded/dfu-programmer app-mobilephone/dfu-util sys-apps/hwloc \
dev-libs/hidapi
sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
}