#!/bin/bash ## iespclone : A script to automate creation of local Git repository by cloning from a remote host. ## Configuration # Remote user you will connect as. REMOTE_USER="baker" # The IP address you will SSH / SCP to. REMOTE_HOST="sis.cs.fsu.edu" # The remote path to your "origin" repository. REMOTE_REPO_PATH="/home/git/iesp.git" # The name of the repository to create LOCAL_REPO_NAME="iesp" if [ ! -f ~/.gitconfig ]; then echo "Please set up your ~/.gitconfig first." exit 1 fi if [ -e ${LOCAL_REPO_NAME} ]; then echo "${LOCAL_REPO_NAME} already exists!" exit 1 fi git clone ssh://${REMOTE_USER}@${REMOTE_HOST}${REMOTE_REPO_PATH} ${LOCAL_REPO_NAME} cd ${LOCAL_REPO_NAME} git status git branch -a exit 0