aboutsummaryrefslogtreecommitdiff
path: root/modules/git/git-shell-commands/readme
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2025-12-22 18:26:31 +0100
committerMax Audron <audron@cocaine.farm>2025-12-22 19:01:35 +0100
commitfa5d7ead69fe58e2317ae803e25bc73069b1ec91 (patch)
tree4ec270405db8ac24fb8643801a9a6174eb8ac03c /modules/git/git-shell-commands/readme
parentupdate catinator (diff)
add git readme command
Diffstat (limited to '')
-rwxr-xr-xmodules/git/git-shell-commands/readme16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/git/git-shell-commands/readme b/modules/git/git-shell-commands/readme
new file mode 100755
index 0000000..b3c34f7
--- /dev/null
+++ b/modules/git/git-shell-commands/readme
@@ -0,0 +1,16 @@
+#!/usr/bin/env sh
+
+if [ -f "$1/config" ]; then
+ cd "$1" || exit
+ case "$2" in
+ "md")
+ git config cgit.readme "main:README.md"
+ ;;
+ "adoc")
+ git config cgit.readme "main:README.adoc"
+ ;;
+ *)
+ echo "no idea what you're talking about. md | adoc"
+ ;;
+ esac
+fi