aboutsummaryrefslogtreecommitdiff
path: root/util/install/gentoo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/install/gentoo.sh')
-rwxr-xr-xutil/install/gentoo.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/util/install/gentoo.sh b/util/install/gentoo.sh
new file mode 100755
index 000000000..d4284e9a9
--- /dev/null
+++ b/util/install/gentoo.sh
@@ -0,0 +1,33 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 echo "This script will make a USE change in order to ensure that that QMK works on your system."
5 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."
6 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."
7
8 read -p "Proceed? [y/N] " res
9 case $res in
10 [Yy]*)
11 return 0;;
12 *)
13 return 1;;
14 esac
15}
16
17_qmk_install() {
18 echo "Installing dependencies"
19
20 sudo touch /etc/portage/package.use/qmkfirmware
21 # tee is used here since sudo doesn't apply to >>
22 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null
23 sudo emerge -auN sys-devel/gcc
24 sudo emerge -au --noreplace \
25 app-arch/unzip app-arch/zip net-misc/wget sys-devel/clang sys-devel/crossdev \
26 \>=dev-lang/python-3.6 \
27 dev-embedded/avrdude dev-embedded/dfu-programmer app-mobilephone/dfu-util
28
29 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
30 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
31
32 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
33}