From bbf8ae7325ededac4c2f1d611be5769ad14fa2bc Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Jun 2015 18:30:23 -0300 Subject: Updates --- commit-updates | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'commit-updates') 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 -- cgit v1.2.3