#!/bin/sh die() { echo "$@"; exit 1; } >&2 # ---------- # if GL_BINDIR was not passed in, find it [ -z "$GL_BINDIR" ] && GL_BINDIR=$( perl -ne 'print($1), exit if /^command="(.+?)\/gl-(time|auth-command) /' < $HOME/.ssh/authorized_keys) # GL_BINDIR still not known? we have a problem... [ -z "$GL_BINDIR" ] && { cat </dev/null) [ -z "$GL_RC" ] && die "hmm weird... GL_RC is undefined; ABORTING" GL_BINDIR=$( get_rc_val GL_BINDIR ) GL_ADMINDIR=$(get_rc_val GL_ADMINDIR) # and finally: git push "$@"