From 91c2b38465a12a9f067adf7d53595b496c0c3986 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 18 Mar 2024 10:36:44 +1100 Subject: [PATCH 1/3] qmk: bump --- Formula/qmk.rb | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Formula/qmk.rb b/Formula/qmk.rb index 282b2d2..2715d89 100644 --- a/Formula/qmk.rb +++ b/Formula/qmk.rb @@ -6,6 +6,7 @@ class Qmk < Formula url "https://files.pythonhosted.org/packages/64/20/cec7ce9b7c05307209542427f417d005f082771596ab0f628f6a888b8aee/qmk-1.1.5.tar.gz" sha256 "2efe3c752230c6ba24b8719c3b6e85a5644bf8f7d0dd237757eda9b7b7e60b11" license "MIT" + revision 1 bottle do root_url "https://ghcr.io/v2/qmk/qmk" @@ -137,20 +138,29 @@ def install virtualenv_install_with_resources end + def qmk_home_set? + `#{HOMEBREW_PREFIX}/bin/qmk config`.include? "user.qmk_home" + end + def caveats - <<~EOS - QMK Firmware has been installed but your environment may not have been setup yet. Please set it up now: + if (HOMEBREW_PREFIX/"bin/qmk").exist? and not qmk_home_set? + <<~EOS + The QMK CLI has been installed but your QMK home is not set. - qmk setup + This may be your first install. Please run `qmk setup` now to find or clone + the repository to your home directory. - If you have a fork already you can specify it like this: + If you have forked qmk/qmk_firmware on GitHub or are using a third-party fork, + you can clone it instead like so: - qmk setup /qmk_firmware + qmk setup /qmk_firmware - This will create qmk_firmware in your home directory. If you'd like to change this location, use the -H flag as well: + To set a specific QMK home (the directory the repository is cloned into), + use the -H flag: - qmk setup -H /your/preferred/path - EOS + qmk setup -H /your/preferred/path + EOS + end end test do From fa05038892befab89e226d0504b42ae4f1449c16 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 18 Mar 2024 10:45:40 +1100 Subject: [PATCH 2/3] Fix style --- Formula/qmk.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Formula/qmk.rb b/Formula/qmk.rb index 2715d89..9feb825 100644 --- a/Formula/qmk.rb +++ b/Formula/qmk.rb @@ -143,24 +143,24 @@ def qmk_home_set? end def caveats - if (HOMEBREW_PREFIX/"bin/qmk").exist? and not qmk_home_set? - <<~EOS - The QMK CLI has been installed but your QMK home is not set. + if (HOMEBREW_PREFIX/"bin/qmk").exist? && !qmk_home_set? + <<~EOS + The QMK CLI has been installed but your QMK home is not set. - This may be your first install. Please run `qmk setup` now to find or clone - the repository to your home directory. + This may be your first install. Please run `qmk setup` now to find or clone + the repository to your home directory. - If you have forked qmk/qmk_firmware on GitHub or are using a third-party fork, - you can clone it instead like so: + If you have forked qmk/qmk_firmware on GitHub or are using a third-party fork, + you can clone it instead like so: - qmk setup /qmk_firmware + qmk setup /qmk_firmware - To set a specific QMK home (the directory the repository is cloned into), - use the -H flag: + To set a specific QMK home (the directory the repository is cloned into), + use the -H flag: - qmk setup -H /your/preferred/path + qmk setup -H /your/preferred/path EOS - end + end end test do From 469dd18c3d97b78bd1bd85ce913107a1b15ca3a4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 18 Mar 2024 10:47:47 +1100 Subject: [PATCH 3/3] Fix style more --- Formula/qmk.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/qmk.rb b/Formula/qmk.rb index 9feb825..bb40f49 100644 --- a/Formula/qmk.rb +++ b/Formula/qmk.rb @@ -159,7 +159,7 @@ def caveats use the -H flag: qmk setup -H /your/preferred/path - EOS + EOS end end