summaryrefslogtreecommitdiff
path: root/git-wrapper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-wrapper.sh')
-rw-r--r--git-wrapper.sh19
1 files changed, 0 insertions, 19 deletions
diff --git a/git-wrapper.sh b/git-wrapper.sh
deleted file mode 100644
index 7a00b31..0000000
--- a/git-wrapper.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-COMMAND=$(echo "$SSH_ORIGINAL_COMMAND" | awk '{print $1}')
-REPO_NAME=$(echo "$SSH_ORIGINAL_COMMAND" | awk '{print $2}' | tr -d "'")
-REPO_NAME=repos/${REPO_NAME}
-
-init_repo() {
- echo "creating repo"
- mkdir -p ${REPO_NAME}
- cd ${REPO_NAME} || exit
- git init --bare --initial-branch=main
-}
-
-if [ ! -d "$REPO_NAME" ]; then
- captured=$(init_repo)
-fi
-
-echo "${COMMAND} '${REPO_NAME}'" >> logs
-exec git-shell -c "${COMMAND} '${REPO_NAME}'"