Browse Source

New git helper scripts 'mfadd' and 'mfqp'

- `mfadd` adds and fetches a user’s fork of Marlin
- `mfqp` invokes `git commit -m`, `mfrb`, `git push -f`
Scott Lahteine 7 years ago
parent
commit
78308b1c0b
2 changed files with 43 additions and 0 deletions
  1. 24
    0
      buildroot/share/git/mfadd
  2. 19
    0
      buildroot/share/git/mfqp

+ 24
- 0
buildroot/share/git/mfadd View File

@@ -0,0 +1,24 @@
1
+#!/usr/bin/env bash
2
+#
3
+# mfadd
4
+#
5
+# Add a remote and fetch it
6
+#
7
+
8
+MFINFO=$(mfinfo) || exit
9
+
10
+IFS=' ' read -a INFO <<< "$MFINFO"
11
+
12
+REPO=${INFO[2]}
13
+OLDBRANCH=${INFO[4]}
14
+
15
+case "$#" in
16
+  1 ) USER=$1 ;;
17
+  * ) echo "Usage: `basename $0` [user]" 1>&2 ; exit 1 ;;
18
+esac
19
+
20
+set -e
21
+
22
+echo "Adding and fetching $USER..."
23
+
24
+git remote add -f "$USER" "git@github.com:$USER/$REPO.git"

+ 19
- 0
buildroot/share/git/mfqp View File

@@ -0,0 +1,19 @@
1
+#!/usr/bin/env bash
2
+#
3
+# mfqp
4
+#
5
+# Add all changed files, commit as "patch", do `mfrb` and `git push -f`
6
+#
7
+
8
+MFINFO=$(mfinfo) || exit
9
+IFS=' ' read -a INFO <<< "$MFINFO"
10
+
11
+case "$#" in
12
+  0 ) ;;
13
+  * ) echo "Usage: `basename $0`" 1>&2 ; exit 1 ;;
14
+esac
15
+
16
+git add * .travis.yml
17
+git commit -m "patch"
18
+mfrb
19
+git push -f

Loading…
Cancel
Save