Subversion Repositories MK-Marlin

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ron 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
[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "Usage: `basename $0` [1|2]" 1>&2 ; exit 1; }
9
 
10
MFINFO=$(mfinfo "$@") || exit 1
11
IFS=' ' read -a INFO <<< "$MFINFO"
12
REPO=${INFO[2]}
13
TARG=${INFO[3]}
14
CURR=${INFO[5]}
15
 
16
git add .
17
git commit -m "patch"
18
 
19
if [[ $CURR == $TARG ]]; then
20
  if [[ $REPO == "MarlinDocumentation" ]]; then
21
    git rebase -i HEAD~2 && git push -f
22
  else
23
    echo "Don't alter the PR Target branch."; exit 1
24
  fi
25
else
26
  mfrb "$@" && git push -f
27
fi