tcontrib: Update gen_rules.sh - git-restrict - simple utility for git repo permission management HTML git clone https://git.parazyd.org/git-restrict DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit bfb37f5b2e763a5e764f9c6d808339cf4fac7040 DIR parent 8afd2755b983911dbed4b06f1cd86eea4f14c42b HTML Author: parazyd <parazyd@dyne.org> Date: Sun, 22 May 2022 14:49:39 +0200 contrib: Update gen_rules.sh Diffstat: M contrib/gen_rules.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- DIR diff --git a/contrib/gen_rules.sh b/contrib/gen_rules.sh t@@ -4,7 +4,16 @@ misc="no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty" gen_for_keys() { while read -r key; do - printf "command=\"/usr/bin/git-restrict %s\",%s %s\n" "$@" "$misc" "$key" + if echo "$key" | grep -q '#'; then + continue + fi + + if [ -z "$key" ]; then + continue + fi + + printf 'command="/usr/local/bin/git-restrict %s",%s %s\n' \ + "$@" "$misc" "$key" done }