Skip to content

Instantly share code, notes, and snippets.

@dwins
Created March 22, 2011 04:01
Show Gist options
  • Save dwins/880755 to your computer and use it in GitHub Desktop.
Save dwins/880755 to your computer and use it in GitHub Desktop.
function checkup() {
REPO="$1"
WORKING_DIR="$2"
if [ -d "${WORKING_DIR}" ];
then
echo "Updating ${WORKING_DIR} from upstream"
# (cd "${WORKING_DIR}" && git pull)
else
git clone "${REPO}" "${WORKING_DIR}"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment