aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/22_forge/files/git-shell-commands/ls
diff options
context:
space:
mode:
authorJan Sydänviita <jan@sydanviita.fi>2026-08-21 16:12:48 +0300
committerJan Sydänviita <jan@sydanviita.fi>2026-08-21 16:12:48 +0300
commit07b45bc892b636dd55472d0a4510c0b064418c01 (patch)
tree0ba0470bbbd6e680a1eb8e396058d4b07a66f5ab /roles/jails/22_forge/files/git-shell-commands/ls
parent6f1ab23e5e4210e8167011e0fea1e1504fdd566e (diff)
Update forge
Diffstat (limited to 'roles/jails/22_forge/files/git-shell-commands/ls')
-rw-r--r--roles/jails/22_forge/files/git-shell-commands/ls13
1 files changed, 10 insertions, 3 deletions
diff --git a/roles/jails/22_forge/files/git-shell-commands/ls b/roles/jails/22_forge/files/git-shell-commands/ls
index ef5d3e5..d72fa9a 100644
--- a/roles/jails/22_forge/files/git-shell-commands/ls
+++ b/roles/jails/22_forge/files/git-shell-commands/ls
@@ -1,4 +1,11 @@
#!/bin/sh
-find . -maxdepth 1 -type d -name "*.git" | while read repo; do
- basename "$repo" .git
-done | sort
+find . -maxdepth 1 -type d -name "*.git" | sort | while read repo; do
+ name="$(basename "$repo" .git)"
+ desc="$(cat "$repo/description" 2>/dev/null)"
+ mirror_to="$(git -C "$repo" remote get-url mirror-to 2>/dev/null)"
+ mirror_from="$(git -C "$repo" remote get-url mirror-from 2>/dev/null)"
+
+ printf "%-30s %s\n" "$name" "$desc"
+ [ -n "$mirror_to" ] && printf " %-28s -> %s\n" "" "$mirror_to"
+ [ -n "$mirror_from" ] && printf " %-28s <- %s\n" "" "$mirror_from"
+done