My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. # exit on first failure
  3. set -e
  4. SED=$(which gsed sed | head -n1)
  5. while [[ $# > 1 ]]; do
  6. DID=0
  7. for FN in Configuration Configuration_adv; do
  8. "${SED}" -i "/^\(\s*\)\/*\s*\(#define\s\+${1}\b\) *\(.*\)$/{s//\1\2 ${2} \/\/ \3/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1
  9. done
  10. ((DID)) ||
  11. eval "echo '#define ${1} ${2}' >>Marlin/Configuration.h" ||
  12. (echo "ERROR: opt_set Can't set or add ${1}" >&2 && exit 9)
  13. shift 2
  14. done