My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mfnew 445B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. #
  3. # mfnew
  4. #
  5. # Create a new branch based on RCBugFix or dev a given branch name
  6. #
  7. MFINFO=$(mfinfo) || exit
  8. IFS=' ' read -a INFO <<< "$MFINFO"
  9. TARG=${INFO[3]}
  10. if [[ ${INFO[4]} == "(no" ]]; then
  11. echo "Branch is unavailable!"
  12. exit 1
  13. fi
  14. case "$#" in
  15. 0 ) BRANCH=pr_for_$TARG-$(date +"%G-%d-%m|%H:%M:%S") ;;
  16. 1 ) BRANCH=$1 ;;
  17. * ) echo "Usage: `basename $0` [branch]" 1>&2 ; exit 1 ;;
  18. esac
  19. git checkout $TARG -b $BRANCH