diff --git a/share/updateall/commands.d/git b/share/updateall/commands.d/git index b50afb7..eff506a 100755 --- a/share/updateall/commands.d/git +++ b/share/updateall/commands.d/git @@ -1,10 +1,13 @@ #!/bin/sh -if pushd ~/Git; then +if cd "${1:-~/Git}"; then for repo in *; do - pushd "$repo" + cd "$repo" git pull - popd + cd .. done - popd +elif [ -z "$1" ]; then + exec "$0" ~/git +else + >&2 echo "Can't find your git folder!" fi