aboutsummaryrefslogtreecommitdiff
path: root/util/linux_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/linux_install.sh')
-rwxr-xr-xutil/linux_install.sh116
1 files changed, 88 insertions, 28 deletions
diff --git a/util/linux_install.sh b/util/linux_install.sh
index 0e4e26fd9..a6a053276 100755
--- a/util/linux_install.sh
+++ b/util/linux_install.sh
@@ -1,40 +1,100 @@
1#!/bin/sh 1#!/bin/sh
2if grep ID /etc/os-release | grep -qE "rhel|fedora"; then 2
3 # RPM based OS 3# Note: This file uses tabs to indent. Please don't mix tabs and spaces.
4 sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc \ 4
5 avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs \ 5GENTOO_WARNING="This script will make a USE change in order to ensure that that QMK works on your system. All changes will be sent to the the file /etc/portage/package.use/qmk_firmware -- please review it, and read Portage's output carefully before installing any packages on your system. You will also need to ensure that your kernel is compiled with support for the keyboard chip that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki."
6 arm-none-eabi-binutils-cs arm-none-eabi-newlib 6
7if grep ID /etc/os-release | grep -qE "fedora"; then
8 sudo dnf install \
9 arm-none-eabi-binutils-cs \
10 arm-none-eabi-gcc-cs \
11 arm-none-eabi-newlib
12 avr-binutils \
13 avr-gcc \
14 avr-libc \
15 binutils-avr32-linux-gnu \
16 dfu-util \
17 dfu-programmer \
18 diffutils \
19 git \
20 gcc \
21 glibc-headers \
22 kernel-devel \
23 kernel-headers \
24 make \
25 perl \
26 unzip \
27 wget \
28 zip
29
7elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then 30elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then
31 DEBIAN_FRONTEND=noninteractive
32 DEBCONF_NONINTERACTIVE_SEEN=true
33 export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
8 sudo apt-get update 34 sudo apt-get update
9 sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc \ 35 sudo apt-get install \
10 dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi \ 36 build-essential \
11 libnewlib-arm-none-eabi 37 avr-libc \
38 binutils-arm-none-eabi \
39 binutils-avr \
40 dfu-programmer \
41 dfu-util \
42 diffutils \
43 gcc \
44 gcc-arm-none-eabi \
45 gcc-avr \
46 git \
47 libnewlib-arm-none-eabi \
48 unzip \
49 wget \
50 zip
51
12elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then 52elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then
13 # install avr-gcc 8.1 until 8.3 is available. See #3657 for details of the bug. 53 # install avr-gcc 8.1 until 8.3 is available. See #3657 for details of the bug.
14 sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.1.0-1-x86_64.pkg.tar.xz 54 sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.1.0-1-x86_64.pkg.tar.xz
15 sudo pacman -S gcc unzip wget zip avr-binutils avr-libc \ 55 sudo pacman -S \
16 dfu-util arm-none-eabi-gcc arm-none-eabi-binutils \ 56 arm-none-eabi-binutils \
17 arm-none-eabi-newlib 57 arm-none-eabi-gcc \
58 arm-none-eabi-newlib \
59 avr-binutils \
60 avr-libc \
61 avr-gcc \
62 base-devel \
63 dfu-util \
64 diff-utils \
65 gcc \
66 git \
67 unzip \
68 wget \
69 zip
18 git clone https://aur.archlinux.org/dfu-programmer.git /tmp/dfu-programmer 70 git clone https://aur.archlinux.org/dfu-programmer.git /tmp/dfu-programmer
19 cd /tmp/dfu-programmer 71 cd /tmp/dfu-programmer
20 makepkg -sic 72 makepkg -sic
21 rm -rf /tmp/dfu-programmer/ 73 rm -rf /tmp/dfu-programmer/
74
22elif grep ID /etc/os-release | grep -q gentoo; then 75elif grep ID /etc/os-release | grep -q gentoo; then
23 echo "This script will make a USE change in order to ensure that that QMK works on your system. All changes will be sent to the the file /etc/portage/package.use/qmk_firmware -- please review it, and read Portage's output carefully before installing any packages on your system. You will also need to ensure that your kernel is compiled with support for the keyboard chip that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki." 76 echo GENTOO_WARNING | fmt
24 echo -n "Proceed (y/N)? " 77 echo -n "Proceed (y/N)? "
25 old_stty_cfg=$(stty -g) 78 old_stty_cfg=$(stty -g)
26 stty raw -echo 79 stty raw -echo
27 answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done ) 80 answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done )
28 stty $old_stty_cfg 81 stty $old_stty_cfg
29 if echo "$answer" | grep -iq "^y" ;then 82 if echo "$answer" | grep -iq "^y" ;then
30 sudo touch /etc/portage/package.use/qmkfirmware 83 sudo touch /etc/portage/package.use/qmkfirmware
31 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware > /dev/null 84 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware > /dev/null
32 sudo emerge -auN sys-devel/gcc app-arch/unzip app-arch/zip net-misc/wget app-mobilephone/dfu-util sys-devel/crossdev dev-embedded/avrdude 85 sudo emerge -auN \
33 sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr 86 app-arch/unzip \
34 echo Done! 87 app-arch/zip \
35 else 88 app-mobilephone/dfu-util \
36 echo "Quitting..." 89 net-misc/wget \
37fi 90 sys-devel/gcc \
91 sys-devel/crossdev dev-embedded/avrdude
92 sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr
93 echo Done!
94 else
95 echo "Quitting..."
96 fi
97
38else 98else
39 echo "Sorry, we don't recognize your OS. Help us by contributing support!" 99 echo "Sorry, we don't recognize your OS. Help us by contributing support!"
40 echo 100 echo