Summary Files Commits Branches @commit @diff @stats
path: root / scripts / desc
diff options
context:
space:
mode:
Commitf522fb4f17114d48e2de5b60a9b34dea350e77cb (patch)
Author
 Syndamia <kamen@syndamia.com>
2026-10-31 11:01:59 +0200
Committer
 Syndamia <kamen@syndamia.com>
2026-10-31 11:10:51 +0200
Files949be2ee14d89675cd8723c6da3a91e30f32d9a9 /scripts/desc
cli-f522fb4f17114d48e2de5b60a9b34dea350e77cb.tar
cli-f522fb4f17114d48e2de5b60a9b34dea350e77cb.tar.gz
cli-f522fb4f17114d48e2de5b60a9b34dea350e77cb.zip
feat!: Initial setup
1 files changed, 25 insertions, 0 deletions
-rwxr-xr-xscripts/desc25
diff --git a/scripts/desc b/scripts/desc
new file mode 100755
index 0000000..ee7c13b
--- /dev/null
+++ b/scripts/desc
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ -z "$1" ]
+then
+ printf 'Repository : '
+ read
+ set "$REPLY"
+fi
+
+if [ ! -f "$1/HEAD" ]
+then
+ echo 'Not a repository!'
+ exit 1
+fi
+
+if [ -z "$2" ]
+then
+ printf 'Description: '
+ read
+ set "$1" "$REPLY"
+fi
+
+# Beware of https://stackoverflow.com/questions/53465980/how-to-keep-parameter-with-spaces-when-running-remote-script-file-with-ssh
+cd "$1" && \
+git config set --file ./config gitweb.description "$2"