aboutsummaryrefslogtreecommitdiffstats
path: root/list
blob: cf77e32be17f94d5ad25ba606d88a8563555a820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

# usage:	list - Lists all "bare" repositories on the server
#		directories which are not bare repos will be skipped

print_if_bare_repo='
	if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true
	then
		printf "%s\n" "${1#./}"
	fi
'

find -type d -name "*.git" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null