-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbb.edn
40 lines (40 loc) · 2.5 KB
/
bb.edn
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
32
33
34
35
36
37
38
39
40
{:tasks
{:requires ([babashka.fs :as fs])
:init (do (defn print-public-task [k]
(let [{:keys [:private :name]} (current-task)]
(when-not private
(println (case k :enter "·" "✓") name)))))
:enter (print-public-task :enter)
:leave (print-public-task :leave)
update-qmk {:doc "Update the QMK submodule repository"
:task (do
(shell {:dir "qmk"} "qmk clean")
(shell {:dir "qmk"} "git submodule update --init --recursive"))}
copy-atreus {:doc "Copy my Atreus keymap in the right place"
:task (let [qmk-path "qmk/keyboards/keyboardio/atreus/keymaps/mds"]
(fs/copy-tree "mds/atreus" qmk-path {:replace-existing true}))}
build-atreus {:doc "Build my Atreus firmware and flash it"
:task (shell {:dir "qmk"} "make keyboardio/atreus:mds:flash")}
copy-rev41 {:doc "Copy my Reviung41 keymap in the right place"
:task (let [qmk-path "qmk/keyboards/reviung/reviung41/keymaps/mds"]
(fs/copy-tree "mds/reviung41" qmk-path {:replace-existing true}))}
build-rev41 {:doc "Build my Reviung41 firmware and flash it"
:task (shell {:dir "qmk"} "make reviung/reviung41:mds:flash")}
copy-3w6 {:doc "Copy my 3w6 keymap in the right place"
:task (let [qmk-path "qmk/keyboards/keycapsss/3w6_2040/keymaps/mds"]
(fs/copy-tree "mds/3w6" qmk-path {:replace-existing true}))}
build-3w6 {:doc "Build my 3w6 (RP2040) firmware and flash it"
:task (shell {:dir "qmk"} "make keycapsss/3w6_2040:mds:flash")}
copy-sweep {:doc "Copy my Sweep keymap in the right place"
:task (let [qmk-path "qmk/keyboards/ferris/keymaps/mds"]
(fs/copy-tree "mds/sweep" qmk-path {:replace-existing true}))}
build-sweep {:doc "Build my Sweep firmware and flash it"
:task (shell {:dir "qmk"} "make ferris/sweep:mds:flash")}
flash-atreus {:doc "Update my Atreus keyboard"
:depends [update-qmk copy-atreus build-atreus]}
flash-rev41 {:doc "Update my Reviung41 keyboard"
:depends [update-qmk copy-rev41 build-rev41]}
flash-3w6 {:doc "Update my 3w6 keyboard"
:depends [update-qmk copy-3w6 build-3w6]}
flash-sweep {:doc "Update my Sweep keyboard"
:depends [update-qmk copy-sweep build-sweep]}}}