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

1234567891011121314151617181920
  1. #!/usr/bin/env bash
  2. #
  3. # mfnew
  4. #
  5. # Create a new branch from the default target with the given name
  6. #
  7. [[ $# < 2 ]] || { echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1; }
  8. MFINFO=$(mfinfo) || exit 1
  9. IFS=' ' read -a INFO <<< "$MFINFO"
  10. TARG=${INFO[3]}
  11. case "$#" in
  12. 0 ) BRANCH=pr_for_$TARG-$(date +"%G-%m-%d_%H.%M.%S") ;;
  13. 1 ) BRANCH=$1 ;;
  14. esac
  15. git fetch upstream
  16. git checkout upstream/$TARG -b $BRANCH