diff --git a/bin/git-check-all.sh b/bin/git-check-all.sh index 918a93a..d72a148 100755 --- a/bin/git-check-all.sh +++ b/bin/git-check-all.sh @@ -89,7 +89,7 @@ dirty_repos=() for gitdir in "${sorted_gitdirs[@]}"; do repo_dir="${gitdir%/.git}" - ((total++)) + ((total++)) || true cd "$repo_dir" || continue @@ -113,10 +113,10 @@ for gitdir in "${sorted_gitdirs[@]}"; do ((behind > 0)) && is_dirty=true if $is_dirty; then - ((dirty++)) + ((dirty++)) || true dirty_repos+=("$repo_dir") else - ((clean++)) + ((clean++)) || true $SHOW_ALL || continue fi diff --git a/bin/git-update-all.sh b/bin/git-update-all.sh index ab3f590..95ba12a 100755 --- a/bin/git-update-all.sh +++ b/bin/git-update-all.sh @@ -66,21 +66,21 @@ failed=0 for gitdir in "${sorted_gitdirs[@]}"; do repo_dir="${gitdir%/.git}" repo_name="${repo_dir#$BASE_DIR/}" - ((total++)) + ((total++)) || true cd "$repo_dir" || continue # Lokale Aenderungen? -> ueberspringen if [[ -n "$(git status --porcelain 2>/dev/null)" ]]; then printf "${C_YELLOW}SKIP${C_RESET} %s (lokale Aenderungen)\n" "$repo_name" - ((skipped++)) + ((skipped++)) || true continue fi # Kein Remote? -> ueberspringen if ! git remote | grep -q .; then printf "${C_YELLOW}SKIP${C_RESET} %s (kein Remote)\n" "$repo_name" - ((skipped++)) + ((skipped++)) || true continue fi @@ -90,11 +90,11 @@ for gitdir in "${sorted_gitdirs[@]}"; do printf "${C_GREEN}OK${C_RESET} %s (aktuell)\n" "$repo_name" else printf "${C_GREEN}PULL${C_RESET} %s (aktualisiert)\n" "$repo_name" - ((updated++)) + ((updated++)) || true fi else printf "${C_RED}FAIL${C_RESET} %s\n" "$repo_name" - ((failed++)) + ((failed++)) || true fi done