Blame | Last modification | View Log | RSS feed
#!/usr/bin/env bash## mffp## 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] [commit-id]" 1>&2 ; exit 1; }if [[ $1 == '1' || $1 == '2' ]]; thenMFINFO=$(mfinfo "$1") || exit 1REF=${2:-HEAD}elseMFINFO=$(mfinfo) || exit 1REF=${1:-HEAD}fiIFS=' ' read -a INFO <<< "$MFINFO"ORG=${INFO[0]}TARG=${INFO[3]}if [[ $ORG == "MarlinFirmware" ]]; thengit push upstream $REF:$TARGelseecho "Not a MarlinFirmware working copy."; exit 1fi