Skip to content

Commit 5fd0212

Browse files
committed
πŸ§‘β€πŸ’» Update documentation, dev scripts
1 parent d8750e4 commit 5fd0212

3 files changed

Lines changed: 33 additions & 8 deletions

File tree

β€Žbuildroot/share/git/mfdocβ€Ž

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,29 @@
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

1031
MFINFO=$(mfinfo "$@") || exit 1
1132
IFS=' ' read -a INFO <<< "$MFINFO"
@@ -16,7 +37,7 @@ BRANCH=${INFO[5]}
1637
[[ $ORG == "MarlinFirmware" && $REPO == "MarlinDocumentation" ]] || { echo "Wrong repository." 1>&2; exit 1; }
1738

1839
opensite() {
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

3051
echo "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

β€Žbuildroot/share/git/mfinfoβ€Ž

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ while [[ $# -gt 0 ]]; do
5555
done
5656

5757
case "$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 ;;
6263
esac
6364

6465
[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2] [branch]" 1>&2 ; exit 1 ; }

β€Žbuildroot/share/git/mfrbβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
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

811
MFINFO=$(mfinfo "$@") || exit 1

0 commit comments

Comments
Β (0)