diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-06-18 18:30:23 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-06-18 18:30:23 -0300 |
commit | bbf8ae7325ededac4c2f1d611be5769ad14fa2bc (patch) | |
tree | 4befcb664ea005e7f67d7da157e53a71809db388 /commit-updates | |
parent | 8e4c72bb038a8ce83f64fce5d236badb4f146085 (diff) | |
download | utils-git-bbf8ae7325ededac4c2f1d611be5769ad14fa2bc.tar.gz utils-git-bbf8ae7325ededac4c2f1d611be5769ad14fa2bc.tar.bz2 |
Updates
Diffstat (limited to 'commit-updates')
-rwxr-xr-x | commit-updates | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/commit-updates b/commit-updates index 698af4d..303bee0 100755 --- a/commit-updates +++ b/commit-updates @@ -9,7 +9,11 @@ ARGS="$*" # Simply update commit if git status &> /dev/null; then if [ ! -z "$1" ]; then - commit "Updates $*" + if [ -e '.git' ]; then + commit "Updates $*" + elif [ -d "$1" ]; then + ( cd $1 && commit "Updates $(basename $1)" ) + fi else commit "Updates $(basename `pwd`)" fi |