summaryrefslogtreecommitdiff
path: root/util/install/opensuse.sh
blob: 47b44ae3644366f88800ce49d5ceabe4883a4380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

_qmk_install_prepare() {
    case $(grep ID /etc/os-release) in
        *15.1*)
            REPO_RELEASE=Leap_15.1;;
        *15.2*)
            REPO_RELEASE=Leap_15.2;;
        *)
            #REPO_RELEASE=Tumbleweed;;
            echo "ERROR: Tumbleweed is currently not supported."
            exit 1
    esac

    sudo zypper addrepo https://download.opensuse.org/repositories/devel:gcc/openSUSE_$REPO_RELEASE/devel:gcc.repo
    sudo zypper addrepo https://download.opensuse.org/repositories/hardware/openSUSE_$REPO_RELEASE/hardware.repo
    sudo zypper --gpg-auto-import-keys refresh
}

_qmk_install() {
    echo "Installing dependencies"

    sudo zypper install -y \
        make clang gcc unzip wget zip \
        python3-pip \
        cross-avr-binutils cross-avr-gcc8 avr-libc \
        cross-arm-binutils cross-arm-none-gcc8 cross-arm-none-newlib-devel \
        avrdude dfu-programmer dfu-util

    python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
}