summaryrefslogtreecommitdiff
path: root/list
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-12-05 21:43:18 -0800
committerElizabeth Hunt <me@liz.coffee>2025-12-05 22:19:52 -0800
commit8667f8615da479a8e9c4e8d5bb5987632d75bfaf (patch)
treee3b4bdb4ebe4f0010c90dd43970822bbe8f8d4a6 /list
parent4cde5dedcf35f2d5850ce0479f25d29bac74daf7 (diff)
downloadwwwgit-8667f8615da479a8e9c4e8d5bb5987632d75bfaf.tar.gz
wwwgit-8667f8615da479a8e9c4e8d5bb5987632d75bfaf.zip
Add ssh server
Diffstat (limited to 'list')
-rw-r--r--list28
1 files changed, 28 insertions, 0 deletions
diff --git a/list b/list
new file mode 100644
index 0000000..43cc82b
--- /dev/null
+++ b/list
@@ -0,0 +1,28 @@
+#!/bin/sh
+# List all git repositories
+
+echo "Available repositories:"
+echo ""
+
+cd "$HOME" || exit 1
+
+# Count only .git repositories
+repo_count=$(find . -maxdepth 1 -type d -name "*.git" | wc -l)
+
+if [ "$repo_count" -eq 0 ]; then
+ echo " (no repositories yet)"
+ echo ""
+ echo "Create one with: init-repo <name>"
+else
+ for repo in *.git; do
+ if [ -d "$repo" ]; then
+ echo " $repo"
+ if [ -f "$repo/description" ]; then
+ desc=$(cat "$repo/description")
+ if [ "$desc" != "Unnamed repository; edit this file 'description' to name the repository." ]; then
+ echo " → $desc"
+ fi
+ fi
+ fi
+ done
+fi