My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

mfdoc 770B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env bash
  2. #
  3. # mfdoc
  4. #
  5. # Start Jekyll in watch mode to work on Marlin Documentation and preview locally
  6. #
  7. MFINFO=$(mfinfo "$@") || exit
  8. IFS=' ' read -a INFO <<< "$MFINFO"
  9. ORG=${INFO[0]}
  10. REPO=${INFO[2]}
  11. BRANCH=${INFO[4]}
  12. if [[ $ORG != "MarlinFirmware" || $REPO != "MarlinDocumentation" ]]; then
  13. echo "Wrong repository."
  14. exit
  15. fi
  16. opensite() {
  17. TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
  18. URL="http://127.0.0.1:4000/"
  19. if [ -z "$TOOL" ]; then
  20. echo "Can't find a tool to open the URL:"
  21. echo $URL
  22. else
  23. echo "Opening preview site in the browser..."
  24. "$TOOL" "$URL"
  25. fi
  26. }
  27. echo "Previewing MarlinDocumentation..."
  28. # wait to open the url for about 8s
  29. ( sleep 45; opensite ) &
  30. bundle exec jekyll serve --watch --incremental