aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git/files/git-shell-commands/list
diff options
context:
space:
mode:
Diffstat (limited to 'roles/git/files/git-shell-commands/list')
-rw-r--r--roles/git/files/git-shell-commands/list22
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/git/files/git-shell-commands/list b/roles/git/files/git-shell-commands/list
new file mode 100644
index 0000000..2977541
--- /dev/null
+++ b/roles/git/files/git-shell-commands/list
@@ -0,0 +1,22 @@
+#!/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 *.git); do
+ is_bare_repo=$(git --git-dir="${repo}" rev-parse --is-bare-repository)
+ if [ "${is_bare_repo}" = "true" ]; then
+ echo "* ${repo}"
+ if [ -e "${PUBLIC}/${repo}" ]; then
+ echo " [public]"
+ fi
+ if [ -f "${repo}/description" ]; then
+ echo " $(cat ${repo}/description)"
+ fi
+ fi
+done