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.

mfadd 361B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. #
  3. # mfadd
  4. #
  5. # Add a remote and fetch it
  6. #
  7. MFINFO=$(mfinfo) || exit
  8. IFS=' ' read -a INFO <<< "$MFINFO"
  9. REPO=${INFO[2]}
  10. OLDBRANCH=${INFO[4]}
  11. case "$#" in
  12. 1 ) USER=$1 ;;
  13. * ) echo "Usage: `basename $0` [user]" 1>&2 ; exit 1 ;;
  14. esac
  15. set -e
  16. echo "Adding and fetching $USER..."
  17. git remote add -f "$USER" "git@github.com:$USER/$REPO.git"