summaryrefslogtreecommitdiff
path: root/util/install/opensuse.sh
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-11-27 01:37:54 +1100
committerDrashna Jael're <drashna@live.com>2021-01-12 22:43:35 -0800
commit546a0e1edccaa7a53ae72c124f792783009b693b (patch)
tree7e75f4f4ded59293af0846c0132941654aa64551 /util/install/opensuse.sh
parenta3b6a0c4d44db2a3aeecdfb71d8c5fb0ee740f09 (diff)
Refactor qmk_install.sh (#10681)
Diffstat (limited to 'util/install/opensuse.sh')
-rwxr-xr-xutil/install/opensuse.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/util/install/opensuse.sh b/util/install/opensuse.sh
new file mode 100755
index 0000000000..47b44ae364
--- /dev/null
+++ b/util/install/opensuse.sh
@@ -0,0 +1,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
+}