1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-26 12:10:40 +00:00
MarlinFirmware/buildroot/share/git/mfadd
2017-07-03 01:13:07 -05:00

21 lines
339 B
Bash
Executable File

#!/usr/bin/env bash
#
# mfadd
#
# Add a remote and fetch it
#
[[ $# == 1 ]] || { echo "Usage: `basename $0` user" 1>&2 ; exit 1; }
USER=$1
MFINFO=$(mfinfo) || exit 1
IFS=' ' read -a INFO <<< "$MFINFO"
REPO=${INFO[2]}
set -e
echo "Adding and fetching $USER..."
git remote add "$USER" "git@github.com:$USER/$REPO.git"
git fetch "$USER"