#!/bin/sh # # /usr/local/share/git-core/contrib/git-shell-commands/list # # Aaron LI # 2017-06-19 # . ${HOME}/vars.conf for repo in $(ls -d ${HOME}/*.git); do is_bare_repo=$(git --git-dir="${repo}" rev-parse --is-bare-repository) if [ "${is_bare_repo}" = "true" ]; then echo "* $(basename ${repo})" if [ -e "${PUBLIC}/${repo}" ]; then echo " [public]" fi if [ -f "${repo}/description" ]; then echo " $(cat ${repo}/description)" fi fi done