Commit | Line | Data |
---|---|---|
81873de4 | 1 | #!/bin/sh |
2 | ||
3 | # usage: list - Lists all "bare" repositories on the server | |
4 | # directories which are not bare repos will be skipped | |
5 | ||
6 | print_if_bare_repo=' | |
7 | if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true | |
8 | then | |
9 | printf "%s\n" "${1#./}" | |
10 | fi | |
11 | ' | |
12 | ||
13 | find -type d -name "*.git" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null |