aboutsummaryrefslogtreecommitdiff
path: root/commit-updates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-06-18 18:35:34 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-06-18 18:35:34 -0300
commit157496a1c1ec5e05a6422e13453aaccc229ff9e5 (patch)
tree2c6a3a2672843beb5fb447dd50359442dc813078 /commit-updates
parentbbf8ae7325ededac4c2f1d611be5769ad14fa2bc (diff)
downloadutils-git-157496a1c1ec5e05a6422e13453aaccc229ff9e5.tar.gz
utils-git-157496a1c1ec5e05a6422e13453aaccc229ff9e5.tar.bz2
Support named paths at commit-updates
Diffstat (limited to 'commit-updates')
-rwxr-xr-xcommit-updates14
1 files changed, 7 insertions, 7 deletions
diff --git a/commit-updates b/commit-updates
index 303bee0..a6aa245 100755
--- a/commit-updates
+++ b/commit-updates
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Commit both on git and svn
+# Commit updates
#
# Parameters
@@ -9,14 +9,14 @@ 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
+ 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