diff options
| author | 2025-11-30 12:27:02 +0100 | |
|---|---|---|
| committer | 2025-11-30 12:27:02 +0100 | |
| commit | 659af74a7b576ea61f1b5d611f4aec8ace0104c2 (patch) | |
| tree | e6c7caa3336e5ab4628d887f2914b13cc671a75b | |
| parent | 5cf42ba3319e56d8a9f8cd9754fbaf5555cc16c2 (diff) | |
Comments
| -rwxr-xr-x | src/git-run | 15 | ||||
| -rwxr-xr-x | src/init | 22 |
2 files changed, 24 insertions, 13 deletions
diff --git a/src/git-run b/src/git-run index 0366e8f..7d70ef8 100755 --- a/src/git-run +++ b/src/git-run @@ -1,13 +1,18 @@ #!/usr/bin/env fish -# load environment +# load common environment source (status dirname)/env -# global variables set gitCommand set repoDir set currentUser (whoami) +### +### +### functions +### +### + function log --on-event log echo "$(date -Is): $argv[1..2] user=$currentUser $argv[3..] ip=$SSH_CONNECTION" >> $_LOG end @@ -62,6 +67,12 @@ function verifyPermissions end end +### +### +### main +### +### + # redirect stdout/stderr to file, no information to potential attacker begin parseCommand $argv; or exit $status @@ -1,13 +1,13 @@ #!/usr/bin/env fish -# load environment +# load common environment source (status dirname)/env -# -# -# function definitions -# -# +### +### +### functions +### +### function fail set_color red @@ -110,11 +110,11 @@ function setupSSH mkdir -p /var/ssh/etc/ssh/ && ssh-keygen -A -f /var/ssh end -# -# -# main -# -# +### +### +### main +### +### argparse 'g/git-uid=?' 'u/user=+' 'r/repo=+' 'h/help' 'v/version' -- $argv or exit 1; |
