Last active
February 17, 2024 09:28
-
-
Save ayufan/21c2ea6d23f583de0f9485aaac92610d to your computer and use it in GitHub Desktop.
Easily manage many klipper configs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
case "$1" in | |
config-*) | |
CONFIG_NAME="$1" | |
;; | |
configs) | |
cd ~/klippy-configs | |
ls -1 klipper-config-* | |
exit 0 | |
;; | |
*) | |
echo "Config name needs to start with 'config-': $1" | |
exit 1 | |
;; | |
esac | |
shift | |
cd ~/klipper | |
set -xeo pipefail | |
exec make KCONFIG_CONFIG="$PWD/klippy-configs/klipper-$CONFIG_NAME" OUT="$PWD/klipper/out/$CONFIG_NAME/" -j3 "$@" |
Then create a script to flash all boards at once:
#!/bin/bash
/opt/klipper-data/bin/klipper-make config-v0-cheetah-v2 flash FLASH_DEVICE=/dev/serial/by-id/usb-Klipper_stm32f401xc_3C003C000851383531393138-if00
/opt/klipper-data/bin/klipper-make config-v0-display flash FLASH_DEVICE=/dev/serial/by-id/usb-Klipper_stm32f042x6_270006000243535031303820-if00
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use with: