Initial commit
This commit is contained in:
commit
8763b7faf2
9 changed files with 86 additions and 0 deletions
13
git-shell-commands/configure
vendored
Executable file
13
git-shell-commands/configure
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Usage: configure <path_to_repository> <config_key> <config_value>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Enter description: "
|
||||
read INPUT
|
||||
|
||||
REPO_PATH="/srv/git/$1"
|
||||
cd "$REPO_PATH" && git config --local "$2" "$3"
|
||||
echo "Wrote '$INPUT' into $REPO_PATH/description"
|
10
git-shell-commands/create
Executable file
10
git-shell-commands/create
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: create <path_to_repository>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REPO_PATH="/srv/git/$1"
|
||||
mkdir -p "$REPO_PATH"
|
||||
cd "$REPO_PATH" && git init --bare
|
||||
echo "New bare git repo created at $REPO_PATH"
|
10
git-shell-commands/create-hidden
Executable file
10
git-shell-commands/create-hidden
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: create-hidden <path_to_repository>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REPO_PATH="/srv/git/$1"
|
||||
mkdir -p "$REPO_PATH"
|
||||
cd "$REPO_PATH" && git init --bare && git config --local cgit.hide 1
|
||||
echo "New bare hidden git repo created at $REPO_PATH"
|
13
git-shell-commands/describe
Executable file
13
git-shell-commands/describe
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: describe <path_to_repository>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Enter description: "
|
||||
read INPUT
|
||||
|
||||
REPO_PATH="/srv/git/$1"
|
||||
cd "$REPO_PATH" && echo "$INPUT" > description
|
||||
echo "Wrote '$INPUT' into $REPO_PATH/description"
|
3
git-shell-commands/help
Executable file
3
git-shell-commands/help
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
echo "Available commands:"
|
||||
ls /srv/git/git-shell-commands
|
4
git-shell-commands/no-interactive-login
Executable file
4
git-shell-commands/no-interactive-login
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
printf '%s\n' "Hi $USER! You've successfully authenticated, but I do not"
|
||||
printf '%s\n' "provide interactive shell access."
|
||||
exit 128
|
Loading…
Add table
Add a link
Reference in a new issue