My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

use_example_configs 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env bash
  2. #
  3. # use_example_configs [repo:]configpath
  4. #
  5. # Examples:
  6. # use_example_configs Creality/CR-10/CrealityV1
  7. # use_example_configs release-2.0.9.4:Creality/CR-10/CrealityV1
  8. #
  9. # If a configpath has spaces (or quotes) escape them or enquote the path
  10. #
  11. CURR=$(git branch 2>/dev/null | grep ^* | sed 's/\* //g')
  12. [[ $CURR == "bugfix-2.0.x" ]] && BRANCH=bugfix-2.0.x || BRANCH=bugfix-2.1.x
  13. IFS=: read -r PART1 PART2 <<< "$@"
  14. [[ -n $PART2 ]] && { REPO="$PART1" ; UDIR="$PART2" ; } \
  15. || { REPO=$BRANCH ; UDIR="$PART1" ; }
  16. EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/$REPO/config/examples"
  17. which curl >/dev/null && TOOL='curl -L -s -S -f -o wgot'
  18. which wget >/dev/null && TOOL='wget -q -O wgot'
  19. restore_configs
  20. cd Marlin
  21. RDIR="${UDIR// /%20}"
  22. echo "Fetching $UDIR configurations from $REPO..."
  23. $TOOL "$EXAMPLES/$RDIR/Configuration.h" >/dev/null 2>&1 && mv wgot Configuration.h
  24. $TOOL "$EXAMPLES/$RDIR/Configuration_adv.h" >/dev/null 2>&1 && mv wgot Configuration_adv.h
  25. $TOOL "$EXAMPLES/$RDIR/_Bootscreen.h" >/dev/null 2>&1 && mv wgot _Bootscreen.h
  26. $TOOL "$EXAMPLES/$RDIR/_Statusscreen.h" >/dev/null 2>&1 && mv wgot _Statusscreen.h
  27. rm -f wgot
  28. cd - >/dev/null