From 33b886c512cfe7ebd2281cdf7dd083c952ba7b04 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 30 Mar 2010 17:53:40 +0530 Subject: [PATCH] we're getting a nice solaris workout after a long time :) --- hooks/gitolite-admin/post-update | 3 ++- src/gl-setup | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hooks/gitolite-admin/post-update b/hooks/gitolite-admin/post-update index 5758cc9..5edf96d 100755 --- a/hooks/gitolite-admin/post-update +++ b/hooks/gitolite-admin/post-update @@ -4,10 +4,11 @@ # (the GL_ADMINDIR env var would have been set by gl-auth-command) GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master +od=$PWD cd $GL_ADMINDIR $GL_BINDIR/gl-compile-conf -cd - +cd $od if [ -f hooks/post-update.secondary ] || [ -L hooks/post-update.secondary ] then diff --git a/src/gl-setup b/src/gl-setup index 0dd8c84..b31c6c5 100755 --- a/src/gl-setup +++ b/src/gl-setup @@ -27,20 +27,20 @@ if [ -n "$pubkey_file" ] then echo $pubkey_file | grep '.pub$' >/dev/null || die "$pubkey_file must end in .pub" [ -f $pubkey_file ] || die "cant find $pubkey_file" - admin_name=$(basename $pubkey_file .pub) + admin_name=` basename $pubkey_file .pub` fi -if [ -f ~/.gitolite.rc ] +if [ -f $HOME/.gitolite.rc ] then perl -ne 's/^\s+//; s/[\s=].*//; print if /^\$/;' < $GL_PACKAGE_CONF/example.gitolite.rc | sort > .newvars - perl -ne 's/^\s+//; s/[\s=].*//; print if /^\$/;' < ~/.gitolite.rc | sort > .oldvars + perl -ne 's/^\s+//; s/[\s=].*//; print if /^\$/;' < $HOME/.gitolite.rc | sort > .oldvars comm -23 .newvars .oldvars > .diffvars if [ -s .diffvars ] then - cp $GL_PACKAGE_CONF/example.gitolite.rc ~/.gitolite.rc.new - echo new version of the rc file saved in ~/.gitolite.rc.new + cp $GL_PACKAGE_CONF/example.gitolite.rc $HOME/.gitolite.rc.new + echo new version of the rc file saved in $HOME/.gitolite.rc.new echo - echo please update ~/.gitolite.rc manually if you need features + echo please update $HOME/.gitolite.rc manually if you need features echo controlled by any of the following variables: echo ---- sed -e 's/^/ /' < .diffvars @@ -49,7 +49,7 @@ then rm -f .newvars .oldvars .diffvars else [ -n "$pubkey_file" ] || die "looks like first run -- I need a pubkey file" - cp $GL_PACKAGE_CONF/example.gitolite.rc ~/.gitolite.rc + cp $GL_PACKAGE_CONF/example.gitolite.rc $HOME/.gitolite.rc fi # setup ssh stuff. We break our normal rule that we will not fiddle with @@ -63,8 +63,8 @@ chmod go-w . .ssh .ssh/authorized_keys gl-install -q -GL_ADMINDIR=$(cd;perl -e 'do ".gitolite.rc"; print $GL_ADMINDIR') -REPO_BASE=$( cd;perl -e 'do ".gitolite.rc"; print $REPO_BASE' ) +GL_ADMINDIR=` cd;perl -e 'do ".gitolite.rc"; print $GL_ADMINDIR'` +REPO_BASE=` cd;perl -e 'do ".gitolite.rc"; print $REPO_BASE' ` [ -f $GL_ADMINDIR/conf/gitolite.conf ] || { cat < $GL_ADMINDIR/conf/gitolite.conf