From 304329d74d93f7f13c11b6b0c8f1135f194197e6 Mon Sep 17 00:00:00 2001 From: propmok <168261638+propmok@users.noreply.github.com> Date: Sun, 28 Apr 2024 06:09:49 -0400 Subject: [PATCH] Add files via upload bash script for QMK MSYS april 2024 - to get rp2040 uf2 output run script in QMK MSYS, follow output instructions, CONVERT_TO is not needed when using nullbitsco/tidbit/rp2040 --- build_rp2040.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 build_rp2040.sh diff --git a/build_rp2040.sh b/build_rp2040.sh new file mode 100644 index 0000000..8066198 --- /dev/null +++ b/build_rp2040.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# run this with `curl -fsSL | sh` + +# get QMK_HOME + QMK_FIRMWARE=$(qmk env | grep QMK_FIRMWARE | cut -d '=' -f 2 | sed s.C:/./c/.g | tr -d \") + +if [[ -z "$QMK_FIRMWARE" ]]; then + # QMK has not been setup yet + qmk setup -y + QMK_FIRMWARE=$(qmk env | grep QMK_FIRMWARE | cut -d '=' -f 2 | sed s.C:/./c/.g | tr -d \") +fi + +# go there +cd "$QMK_FIRMWARE" + +# add the remote +git remote add nullbits https://github.com/jaygreco/qmk_firmware + +# check if there are changes +if ! git diff --exit-code; then + # there are unpushed changes + echo "There are unpushed changes to your QMK firmware repo! The're going to be stashed. To get them back, use 'git stash pop'." +fi + +git fetch nullbits + +# checkout the nullbits repo rp2040_clean branch +git checkout nullbits/rp2040_clean + +# reset submodules +git submodule update + +# print a message +echo "Done! You now have the nullbits RP2040 repo checked out." +echo "Build RP2040 firmwares with 'qmk compile -kb nullbitsco//rp2040 -km all'." +echo "To get the original QMK repository back, check it out with 'git checkout master'" \ No newline at end of file