I forgot I still have Solaris users...
change some obvious bashisms. There may be more, however, so if you find them, let me know.
This commit is contained in:
parent
909bc43e70
commit
550982f69e
|
@ -6,7 +6,7 @@ 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=` 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 <<EOF2
|
||||
|
@ -41,10 +41,10 @@ GL_BYPASS_UPDATE_HOOK=1
|
|||
export GL_RC
|
||||
export GL_BINDIR
|
||||
export GL_ADMINDIR
|
||||
GL_RC=$(get_rc_val GL_RC 2>/dev/null)
|
||||
GL_RC=`get_rc_val GL_RC 2>/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)
|
||||
GL_BINDIR=` get_rc_val GL_BINDIR `
|
||||
GL_ADMINDIR=`get_rc_val GL_ADMINDIR`
|
||||
|
||||
# and finally:
|
||||
git push "$@"
|
||||
|
|
|
@ -51,7 +51,7 @@ echo; echo "PLEASE READ WARNINGS IN SOURCE BEFORE USING!"; echo
|
|||
|
||||
export oldhome=$HOME
|
||||
export oldpwd=$PWD
|
||||
export tmp=$(mktemp -d);
|
||||
export tmp=`mktemp -d`
|
||||
trap "rm -rf $tmp" 0;
|
||||
cd $tmp
|
||||
|
||||
|
@ -97,8 +97,8 @@ echo
|
|||
echo "checking what pubkeys (if any) have push rights..."
|
||||
for f in `find .gitolite/keydir -name "*.pub" | sort`
|
||||
do
|
||||
f=$(basename $f)
|
||||
u=$(perl -e '$u = shift; $u =~ s/(\@[^.]+)?\.pub$//; print $u' $f)
|
||||
f=`basename $f`
|
||||
u=`perl -e '$u = shift; $u =~ s/(\@[^.]+)?\.pub$//; print $u' $f`
|
||||
SSH_ORIGINAL_COMMAND=info $GL_BINDIR/gl-auth-command $u | grep R...W..gitolite-admin.$ > /dev/null && echo ' '$f
|
||||
done
|
||||
echo
|
||||
|
|
10
src/gl-setup
10
src/gl-setup
|
@ -24,7 +24,7 @@ get_rc_val() {
|
|||
${0%/*}/gl-query-rc $1
|
||||
}
|
||||
|
||||
TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
|
||||
TEMPDIR=`mktemp -d -t tmp.XXXXXXXXXX`
|
||||
export TEMPDIR
|
||||
trap "/bin/rm -rf $TEMPDIR" 0
|
||||
|
||||
|
@ -52,7 +52,7 @@ else
|
|||
fi
|
||||
|
||||
export GL_RC
|
||||
GL_RC=$(get_rc_val GL_RC 2>/dev/null)
|
||||
GL_RC=`get_rc_val GL_RC 2>/dev/null`
|
||||
[ -z "$GL_RC" ] && GL_RC=$HOME/.gitolite.rc
|
||||
|
||||
if [ -f $GL_RC ]
|
||||
|
@ -101,9 +101,9 @@ fi
|
|||
export GL_BINDIR
|
||||
export REPO_BASE
|
||||
export GL_ADMINDIR
|
||||
GL_BINDIR=$( get_rc_val GL_BINDIR )
|
||||
REPO_BASE=$( get_rc_val REPO_BASE )
|
||||
GL_ADMINDIR=$(get_rc_val GL_ADMINDIR)
|
||||
GL_BINDIR=` get_rc_val GL_BINDIR `
|
||||
REPO_BASE=` get_rc_val REPO_BASE `
|
||||
GL_ADMINDIR=`get_rc_val GL_ADMINDIR`
|
||||
|
||||
# now we get to gitolite itself
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ buildroot=$4;
|
|||
[ -n "$1" ] && [ -z "$3" ] && die "I need all 3 directories or none at all"
|
||||
# supply default values to args 1, 2, and 3 if not provided
|
||||
[ -z "$1" ] && {
|
||||
euid=$(perl -e 'print $>')
|
||||
euid=`perl -e 'print $>'`
|
||||
if [ "$euid" = "0" ]
|
||||
then
|
||||
set /usr/local/bin /var/gitolite/conf /var/gitolite/hooks
|
||||
|
|
Loading…
Reference in a new issue