summaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-20 10:20:42 +0200
committerGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-20 10:20:42 +0200
commit9d9355a379f8a9922645ecd87b66f68acbb6bc89 (patch)
tree3491b69ae5d327556f0e5d4bd732ec6208746ece /run
parentbaaa4d83c98b42a1df98e70b972774ad8f5b8ead (diff)
Moved files to src and renamed variables
Diffstat (limited to 'run')
-rwxr-xr-xrun23
1 files changed, 0 insertions, 23 deletions
diff --git a/run b/run
deleted file mode 100755
index ec997ab..0000000
--- a/run
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env fish
-
-set REPO_PERMISSIONS /etc/repo-permissions
-set GIT_COMMAND_REGEX "^(git-(?:upload-pack|receive-pack|upload-archive)) '((?:\/[a-zA-Z-]+)+.git)'\$"
-
-# check given git command
-set -l matcher (string match -r -g $GIT_COMMAND_REGEX "$argv")
-if test (count $matcher) -ne 2
- # there should be two groups otherwise something is wrong
- exit 1
-end
-
-# echo check for permissions
-set -l checkUser (whoami)
-set -l gitCommand $matcher[1]
-set -l repo $matcher[2]
-set -l repoDir srv repos
-set -l repoDir /(string join -n '/' $repoDir (string split '/' $repo))
-cat $REPO_PERMISSIONS | grep -q -E "^$repoDir:$checkUser\$"
-or exit 1;
-
-# run command
-/usr/bin/sudo -u git /usr/bin/git-shell -c "$gitCommand '$repoDir'"