From 78308b1c0b40dee326567a0c360b8fd429c7abc5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 20 Apr 2017 21:27:32 -0500 Subject: [PATCH] New git helper scripts 'mfadd' and 'mfqp' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `mfadd` adds and fetches a user’s fork of Marlin - `mfqp` invokes `git commit -m`, `mfrb`, `git push -f` --- buildroot/share/git/mfadd | 24 ++++++++++++++++++++++++ buildroot/share/git/mfqp | 19 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 buildroot/share/git/mfadd create mode 100755 buildroot/share/git/mfqp diff --git a/buildroot/share/git/mfadd b/buildroot/share/git/mfadd new file mode 100755 index 0000000000..6d69124498 --- /dev/null +++ b/buildroot/share/git/mfadd @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# mfadd +# +# Add a remote and fetch it +# + +MFINFO=$(mfinfo) || exit + +IFS=' ' read -a INFO <<< "$MFINFO" + +REPO=${INFO[2]} +OLDBRANCH=${INFO[4]} + +case "$#" in + 1 ) USER=$1 ;; + * ) echo "Usage: `basename $0` [user]" 1>&2 ; exit 1 ;; +esac + +set -e + +echo "Adding and fetching $USER..." + +git remote add -f "$USER" "git@github.com:$USER/$REPO.git" diff --git a/buildroot/share/git/mfqp b/buildroot/share/git/mfqp new file mode 100755 index 0000000000..2420f48886 --- /dev/null +++ b/buildroot/share/git/mfqp @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# +# mfqp +# +# Add all changed files, commit as "patch", do `mfrb` and `git push -f` +# + +MFINFO=$(mfinfo) || exit +IFS=' ' read -a INFO <<< "$MFINFO" + +case "$#" in + 0 ) ;; + * ) echo "Usage: `basename $0`" 1>&2 ; exit 1 ;; +esac + +git add * .travis.yml +git commit -m "patch" +mfrb +git push -f