My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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