From 4842ca9eb7ab7f6f41a027f4054280319933c712 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sun, 4 Jun 2023 19:44:09 +0200 Subject: [PATCH] =?UTF-8?q?Corerction=20:=20r=C3=A9-=C3=A9criture=20du=20s?= =?UTF-8?q?cript=20de=20mise=20=C3=A0=20jour=20des=20d=C3=A9p=C3=B4ts=20Gi?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- share/updateall/commands.d/git | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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