scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit 4e5fe91116eb2c61a3f23a8cb9206585739b9cfb
parent 21aebd39fb6fc65f98774e1ed0038f0595c85029
Author: sin <sin@2f30.org>
Date:   Fri, 28 Jun 2013 12:30:51 +0100

Correctly skip non git repos

Diffstat:
Mgit-update-all | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/git-update-all b/git-update-all @@ -2,12 +2,12 @@ # Update all git repos in current folder for i in *; do - cd "$i" - echo "Updating $i" - if [ -d .git ]; then + if [ -d "$i"/.git ]; then + cd "$i" + echo "Updating $i..." git pull + cd - >/dev/null else - echo Not a git repo, skipping 1>&2 + echo "Skipping $i... not a git repo" 1>&2 fi - cd - >/dev/null done