File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#
55# Start Jekyll in watch mode to work on Marlin Documentation and preview locally
66#
7+ # Usage: mfdoc [--host HOST] [--port PORT]
8+ #
9+
10+ TEST=0
11+ HOST=" 127.0.0.1"
12+ PORT=" 4000"
713
8- [[ $# == 0 ]] || { echo " Usage: ` basename $0 ` " 1>&2 ; exit 1; }
14+ while [[ $# -gt 0 ]]; do
15+ case " $1 " in
16+ -t) TEST=1; shift ;;
17+ --test) TEST=1; shift ;;
18+ --host) shift ; HOST=" $1 " ; shift ;;
19+ --port) shift ; PORT=" $1 " ; shift ;;
20+ --help)
21+ echo " Usage: ` basename $0 ` [--test] [--host HOST] [--port PORT]"
22+ exit 0
23+ ;;
24+ * )
25+ echo " Usage: ` basename $0 ` [--test] [--host HOST] [--port PORT]" 1>&2
26+ exit 1
27+ ;;
28+ esac
29+ done
930
1031MFINFO=$( mfinfo " $@ " ) || exit 1
1132IFS=' ' read -a INFO <<< " $MFINFO"
@@ -16,7 +37,7 @@ BRANCH=${INFO[5]}
1637[[ $ORG == " MarlinFirmware" && $REPO == " MarlinDocumentation" ]] || { echo " Wrong repository." 1>&2 ; exit 1; }
1738
1839opensite () {
19- URL=" http://127.0.0.1:4000 /"
40+ URL=" http://$HOST : $PORT /"
2041 OPEN=$( which gnome-open xdg-open open | head -n1 )
2142 if [ -z " $OPEN " ]; then
2243 echo " Can't find a tool to open the URL:"
@@ -29,7 +50,7 @@ opensite() {
2950
3051echo " Previewing MarlinDocumentation..."
3152
32- bundle exec jekyll serve --watch --incremental | {
53+ bundle exec jekyll serve --host " $HOST " --port " $PORT " -- watch --incremental | {
3354 while IFS= read -r line
3455 do
3556 [[ $line =~ " Server running" ]] && opensite
Original file line number Diff line number Diff line change @@ -55,10 +55,11 @@ while [[ $# -gt 0 ]]; do
5555done
5656
5757case " $REPO " in
58- Marlin ) TARG=bugfix-2.1.x ; (( INDEX == 1 )) && TARG=bugfix-1.1.x ; [[ $BRANCH =~ ^[12]$ ]] && USAGE=1 ;;
59- Configurations ) TARG=import-2.0.x ;;
60- MarlinDocumentation ) TARG=master ;;
61- AutoBuildMarlin ) TARG=master ;;
58+ Marlin ) TARG=bugfix-2.1.x ; (( INDEX == 1 )) && TARG=bugfix-1.1.x ; [[ $BRANCH =~ ^[12]$ ]] && USAGE=1 ;;
59+ Configurations ) TARG=import-2.1.x ;;
60+ MarlinBuilds ) TARG=main ;;
61+ Marlin3 ) TARG=dev ;;
62+ * ) TARG=master ;;
6263esac
6364
6465[[ $USAGE == 1 ]] && { echo " usage: ` basename $0 ` [1|2] [branch]" 1>&2 ; exit 1 ; }
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22#
33# mfrb
4+ # MF Rebase manually to re-message, merge, drop, etc.
45#
5- # Do "git rebase -i" against the repo's "target" branch
6+ # Does "git rebase -i" against the repo's "target" branch
7+ #
8+ # Usually `git rebase -i upstream/bugfix-2.1.x`
69#
710
811MFINFO=$( mfinfo " $@ " ) || exit 1
You canβt perform that action at this time.
0 commit comments