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

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. #
  3. # mffp [1|2] [commit-id]
  4. #
  5. # Push the given commit (or HEAD) upstream immediately.
  6. # By default: `git push upstream HEAD:bugfix-1.1.x`
  7. #
  8. [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2] [commit-id]" 1>&2 ; exit 1; }
  9. if [[ $1 == '1' || $1 == '2' ]]; then
  10. MFINFO=$(mfinfo "$1") || exit 1
  11. REF=${2:-HEAD}
  12. else
  13. MFINFO=$(mfinfo) || exit 1
  14. REF=${1:-HEAD}
  15. fi
  16. IFS=' ' read -a INFO <<< "$MFINFO"
  17. ORG=${INFO[0]}
  18. TARG=${INFO[3]}
  19. if [[ $ORG == "MarlinFirmware" ]]; then
  20. git push upstream $REF:$TARG
  21. else
  22. echo "Not a MarlinFirmware working copy."; exit 1
  23. fi