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

mfdoc 884B

1234567891011121314151617181920212223242526272829303132333435363738
  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. [[ $# == 0 ]] || { echo "usage: `basename $0`" 1>&2 ; exit 1; }
  8. MFINFO=$(mfinfo "$@") || exit 1
  9. IFS=' ' read -a INFO <<< "$MFINFO"
  10. ORG=${INFO[0]}
  11. REPO=${INFO[2]}
  12. BRANCH=${INFO[5]}
  13. [[ $ORG == "MarlinFirmware" && $REPO == "MarlinDocumentation" ]] || { echo "Wrong repository." 1>&2; exit 1; }
  14. opensite() {
  15. TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
  16. URL="http://127.0.0.1:4000/"
  17. if [ -z "$TOOL" ]; then
  18. echo "Can't find a tool to open the URL:"
  19. echo $URL
  20. else
  21. echo "Opening preview site in the browser..."
  22. "$TOOL" "$URL"
  23. fi
  24. }
  25. echo "Previewing MarlinDocumentation..."
  26. bundle exec jekyll serve --watch --incremental | {
  27. while IFS= read -r line
  28. do
  29. [[ $line =~ "Server running" ]] && opensite
  30. echo "$line"
  31. done
  32. }