My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env bash
  2. #
  3. # mfpr
  4. #
  5. # Make a PR of the current branch against RCBugFix or dev
  6. #
  7. MFINFO=$(mfinfo "$@") || exit
  8. IFS=' ' read -a INFO <<< "$MFINFO"
  9. ORG=${INFO[0]}
  10. FORK=${INFO[1]}
  11. REPO=${INFO[2]}
  12. TARG=${INFO[3]}
  13. BRANCH=${INFO[4]}
  14. if [[ ! -z "$1" ]]; then { BRANCH=$1 ; git checkout $1 || exit 1; } fi
  15. if [[ $BRANCH == $TARG ]]; then
  16. echo "Can't make a PR from $BRANCH" ; exit
  17. fi
  18. if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then firstpush; fi
  19. TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
  20. URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1"
  21. if [ -z "$TOOL" ]; then
  22. echo "Can't find a tool to open the URL:"
  23. echo $URL
  24. else
  25. echo "Opening a New PR Form..."
  26. "$TOOL" "$URL"
  27. fi