#!/bin/bash # # Commit updates # # Parameters ARGS="$*" # Simply update commit if git status &> /dev/null; then if [ ! -z "$1" ]; then commit "Updates $*" else commit "Updates $(basename `pwd`)" fi git fetch --all else if [ ! -z "$1" ] && [ -d "$1" ]; then ( cd $1 &> /dev/null && commit "Updates $(basename $1)" && git fetch --all ) else mr commit -m "Updates" mr fetch fi fi