diff options
| author | a73x <[email protected]> | 2024-08-25 10:04:00 +0100 |
|---|---|---|
| committer | a73x <[email protected]> | 2024-08-25 10:04:00 +0100 |
| commit | 597b4b5f2d26d30beebc1a4ab529835f76655fee (patch) | |
| tree | cd5c86d0ecdfec1bc8d2e053de9db25fe182aef8 /git-wrapper.sh | |
| parent | 911a7dc7296f76a5de0538b3c3536167a89195d8 (diff) | |
move git repos into repo folder
Diffstat (limited to 'git-wrapper.sh')
| -rw-r--r-- | git-wrapper.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-wrapper.sh b/git-wrapper.sh index 21d1b23..7a00b31 100644 --- a/git-wrapper.sh +++ b/git-wrapper.sh @@ -1,6 +1,8 @@ #!/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" @@ -13,4 +15,5 @@ if [ ! -d "$REPO_NAME" ]; then captured=$(init_repo) fi -exec git-shell -c "$SSH_ORIGINAL_COMMAND" +echo "${COMMAND} '${REPO_NAME}'" >> logs +exec git-shell -c "${COMMAND} '${REPO_NAME}'" |
