My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_all_examples 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env bash
  2. echo "This script will attempt to build Marlin for all known configurations."
  3. echo "In case of failure, the current configuration remains in your repository."
  4. echo "To revert to your current version, run 'git checkout -f'."
  5. self=`basename "$0"`
  6. HERE=`dirname "$0"`
  7. # Check dependencies
  8. which curl 1>/dev/null 2>&1 || { echo "curl not found, please install it"; exit ; }
  9. which git 1>/dev/null 2>&1 || { echo "git not found, please install it"; exit ; }
  10. if [ -z "$1" ]; then
  11. echo ""
  12. echo "ERROR: "
  13. echo " Expected parameter: $self base_branch [resume_point]"
  14. echo " with:"
  15. echo " base_branch The branch in the Configuration repository to use"
  16. echo " resume_point If not empty, resume building from this board"
  17. exit
  18. fi
  19. # Check if called in the right folder
  20. if [ ! -e "Marlin/src" ]; then
  21. echo "This script must be called from the root folder of a Marlin repository, please navigate to this folder and call:"
  22. echo "buildroot/ci-check/$self $1"
  23. exit
  24. fi
  25. # Check if the current repository has unmerged changes
  26. if [ -z "$2" ]; then
  27. git diff --quiet || { echo "Your current repository is not clean. Either commit your change or stash them, and re-run this script"; exit ; }
  28. else
  29. echo "Resuming from $2"
  30. fi
  31. TMPDIR=`mktemp -d`
  32. # Ok, let's do our stuff now
  33. # First extract the current temporary folder
  34. echo "Fetching configuration repository"
  35. if [ ! -e "$TMPDIR/README.md" ]; then
  36. git clone --single-branch --branch "$1" https://github.com/MarlinFirmware/Configurations.git "$TMPDIR" || { echo "Failed to clone the configuration repository"; exit ; }
  37. rm -r $TMPDIR/.git
  38. fi
  39. echo
  40. echo "Start building now..."
  41. echo "====================="
  42. shopt -s nullglob
  43. for config in $TMPDIR/config/examples/*/; do
  44. [ -d "${config}" ] || continue
  45. base=`basename "$config"`
  46. if [ ! -z "$2" ] && [ "$2" != "$base" ]; then
  47. echo "Skipping $base..."
  48. continue
  49. fi
  50. "$HERE/build_example" "internal" "$TMPDIR" "$base" || { echo "Failed to build $base"; exit ; }
  51. done
  52. rm -r "$TMPDIR"