summaryrefslogtreecommitdiff
path: root/run
blob: 061b5a34ac7037aef926567e31e1d61ed92d93bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env fish

# echo check for permissions
set -l USER (whoami)
set matcher (string match -r -g "^.*'(.*)'\$" "$argv")
cat /srv/repos/permissions | grep -q -E "^$matcher[1]:$USER"
or exit 1;

# run command
/usr/bin/sudo -u git /usr/bin/git-shell -c "$argv"