diff options
Diffstat (limited to '')
| -rwxr-xr-x | modules/git/git-shell-commands/desc | 6 | ||||
| -rwxr-xr-x | modules/git/git-shell-commands/help | 11 | ||||
| -rwxr-xr-x | modules/git/git-shell-commands/init | 9 | ||||
| -rwxr-xr-x | modules/git/git-shell-commands/owner | 6 | ||||
| -rwxr-xr-x | modules/git/git-shell-commands/section | 6 |
5 files changed, 38 insertions, 0 deletions
diff --git a/modules/git/git-shell-commands/desc b/modules/git/git-shell-commands/desc new file mode 100755 index 0000000..52cc8bb --- /dev/null +++ b/modules/git/git-shell-commands/desc @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +if [ -f "$1/config" ]; then + cd "$1" + git config cgit.desc "$2" +fi diff --git a/modules/git/git-shell-commands/help b/modules/git/git-shell-commands/help new file mode 100755 index 0000000..7572fe4 --- /dev/null +++ b/modules/git/git-shell-commands/help @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +echo "Commands:" +echo " init <repo>" +echo " Initialize a new bare repo, default branch is main" +echo " desc <repo> <desc>" +echo " Set repo description" +echo " owner <repo> <owner>" +echo " Set repo owner" +echo " section <repo> <section>" +echo " Set repo section" diff --git a/modules/git/git-shell-commands/init b/modules/git/git-shell-commands/init new file mode 100755 index 0000000..603b817 --- /dev/null +++ b/modules/git/git-shell-commands/init @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +REPO="$1" + +if [ ! -f "$REPO/config" ]; then + mkdir -p "$REPO" + cd "$REPO" + git init --bare --shared +fi diff --git a/modules/git/git-shell-commands/owner b/modules/git/git-shell-commands/owner new file mode 100755 index 0000000..d65fd02 --- /dev/null +++ b/modules/git/git-shell-commands/owner @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +if [ -f "$1/config" ]; then + cd "$1" + git config cgit.owner "$2" +fi diff --git a/modules/git/git-shell-commands/section b/modules/git/git-shell-commands/section new file mode 100755 index 0000000..b1a998e --- /dev/null +++ b/modules/git/git-shell-commands/section @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +if [ -f "$1/config" ]; then + cd "$1" + git config cgit.section "$2" +fi |
