]> gitweb.fluxo.info Git - utils-git.git/commitdiff
Updates
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Jun 2015 21:30:23 +0000 (18:30 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Jun 2015 21:30:23 +0000 (18:30 -0300)
commit-updates

index 698af4d51bc502bd8f3255340b2ea42799d83bcd..303bee0827f53b419123c2e85747f1f572e7627b 100755 (executable)
@@ -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