--- /dev/null
+This is a collection of commands for use in the restricted git-shell. These
+scripts allow users to log in as the `git` user and add/modify/delete
+repositories. Note that there is no access control--any user who can login can
+change any repo!
--- /dev/null
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <reponame>"
+ exit
+fi
+
+REPO="${1}.git"
+
+if [ -d "/srv/git/$REPO" ]; then
+ echo "Repo $REPO already exists"
+ exit
+fi
+
+cd /srv/git
+mkdir "$REPO"
+cd "$REPO"
+git init --bare
+echo "#!/bin/sh" >> hooks/post-receive
+echo 'git cat-file blob HEAD:README.md | markdown > $GIT_DIR/README.html' >> hooks/post-receive
+chmod +x hooks/post-receive
+touch git-daemon-export-ok
+echo "Created $REPO"
+echo "Add it to your project with: git remote add origin git@<server>:/srv/git/${REPO}"
--- /dev/null
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <reponame>"
+ exit
+fi
+
+REPO="${1}.git"
+
+if [ ! -d "/srv/git/$REPO" ]; then
+ echo "Repo $REPO does not exist"
+ exit
+fi
+
+mkdir -p /tmp/git-trash/
+cd /srv/git
+mv "$REPO" /tmp/git-trash/
+echo "Moved $REPO to /tmp/git-trash/"
--- /dev/null
+#!/bin/sh
+echo "Available commands:"
+ls /home/git/git-shell-commands
--- /dev/null
+#!/bin/sh
+ls /srv/git
--- /dev/null
+#!/bin/sh
+
+if [ -z "$2" ]; then
+ echo "Usage: $0 <reponame> <description>"
+ exit
+fi
+
+REPO="${1}.git"
+
+if [ ! -d "/srv/git/$REPO" ]; then
+ echo "Repo $REPO does not exist"
+ exit
+fi
+
+cd "/srv/git/$REPO"
+echo "Old description:"
+cat description
+
+echo "$2" > description
+echo
+echo "New description:"
+cat description