Created
July 22, 2025 12:31
-
-
Save BtbN/156fc68cbd58d0a4d2a51c5b35cbb6b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GITOLITE_SHELL="/var/lib/gitolite/gitolite/src/gitolite-shell" | |
FULL_COMMAND="$SSH_ORIGINAL_COMMAND" | |
COMMAND_NAME="${FULL_COMMAND%% *}" | |
REPO_NAME="${FULL_COMMAND#*\'}" | |
REPO_NAME="${REPO_NAME%\'*}" | |
if [[ "$REPO_NAME" == "ffmpeg.git" && "$COMMAND_NAME" == "git-receive-pack" ]]; then | |
exec ssh -T [email protected] "$COMMAND_NAME 'FFmpeg/FFmpeg.git'" | |
elif [[ "$REPO_NAME" == "ffmpeg/nv-codec-headers.git" && "$COMMAND_NAME" == "git-receive-pack" ]]; then | |
exec ssh -T [email protected] "$COMMAND_NAME 'FFmpeg/nv-codec-headers.git'" | |
else | |
exec "$GITOLITE_SHELL" "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment