aboutsummaryrefslogtreecommitdiff
path: root/commit-updates
blob: 303bee0827f53b419123c2e85747f1f572e7627b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#
# Commit both on git and svn
#

# Parameters
ARGS="$*"

# 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
  else
    commit "Updates $(basename `pwd`)"
  fi
else
  mr commit -m "Updates"
fi