DrawingBot-CoreXY/Marlin Firmware/buildroot/share/git/mffp
bisse 9babd991e2 Add Marlin firmware. Has initial configuration for CoreXY and 1 servo.
Update CAD file with improved clearances for Pilot G2 cartridge clearances after first print.
2021-10-03 20:35:11 -05:00

28 lines
633 B
Bash

#!/usr/bin/env bash
#
# mffp [1|2|3] [commit-id]
#
# Push the given commit (or HEAD) upstream immediately.
# By default: `git push upstream HEAD:bugfix-1.1.x`
#
[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [commit-id]" 1>&2 ; exit 1; }
if [[ $1 == '1' || $1 == '2' || $1 == '3' ]]; then
MFINFO=$(mfinfo "$1") || exit 1
REF=${2:-HEAD}
else
MFINFO=$(mfinfo) || exit 1
REF=${1:-HEAD}
fi
IFS=' ' read -a INFO <<< "$MFINFO"
ORG=${INFO[0]}
TARG=${INFO[3]}
if [[ $ORG == "MarlinFirmware" ]]; then
git push upstream $REF:$TARG
else
echo "Not a MarlinFirmware working copy."; exit 1
fi