1
mirror of https://github.com/valentineus/kp3s-lgvl.git synced 2025-07-04 10:10:26 +03:00

Initial commit

This commit is contained in:
Georgiy Bondarenko
2021-03-04 22:54:23 +05:00
commit e8701195e6
2284 changed files with 1561144 additions and 0 deletions

11
buildroot/bin/pins_set Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
IFS='/' read -r -a PINPATH <<< "$1"
DIR=${PINPATH[0]}
NAM=${PINPATH[1]}
PIN=$2
VAL=$3
SED=$(which gsed || which sed)
eval "${SED} -i '/\(\/\/\)*\(#define \+${PIN}\b\).*$/{s//\2 ${VAL}/;h};\${x;/./{x;q0};x;q9}' Marlin/src/pins/$DIR/pins_${NAM}.h" ||
(echo "ERROR: pins_set Can't find ${PIN}" >&2 && exit 9)