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

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