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 407B

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