git-shell-commands/list
2022-04-02 09:15:10 +00:00

13 lines
319 B
Bash
Executable file

#!/bin/sh
TRASH_DIR='trash'
print_if_bare_repo='
if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true
then
printf "%s\n %s\n\n" "${1#./}" "$(cat ${1}/description)"
fi
'
find -type d -name "*.git" -not -path "./${TRASH_DIR}/*" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null