#!/bin/bash
#
-# Commit both on git and svn
+# Commit updates
#
# Parameters
# Simply update commit
if git status &> /dev/null; then
if [ ! -z "$1" ]; then
- if [ -e '.git' ]; then
- commit "Updates $*"
- elif [ -d "$1" ]; then
- ( cd $1 && commit "Updates $(basename $1)" )
- fi
+ commit "Updates $*"
else
commit "Updates $(basename `pwd`)"
fi
else
- mr commit -m "Updates"
+ if [ ! -z "$1" ] && [ -d "$1" ]; then
+ ( cd $1 &> /dev/null && commit "Updates $(basename $1)" )
+ else
+ mr commit -m "Updates"
+ fi
fi