we're getting a nice solaris workout after a long time :)
This commit is contained in:
parent
72b63abaf2
commit
33b886c512
|
@ -4,10 +4,11 @@
|
||||||
# (the GL_ADMINDIR env var would have been set by gl-auth-command)
|
# (the GL_ADMINDIR env var would have been set by gl-auth-command)
|
||||||
GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master
|
GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master
|
||||||
|
|
||||||
|
od=$PWD
|
||||||
cd $GL_ADMINDIR
|
cd $GL_ADMINDIR
|
||||||
$GL_BINDIR/gl-compile-conf
|
$GL_BINDIR/gl-compile-conf
|
||||||
|
|
||||||
cd -
|
cd $od
|
||||||
|
|
||||||
if [ -f hooks/post-update.secondary ] || [ -L hooks/post-update.secondary ]
|
if [ -f hooks/post-update.secondary ] || [ -L hooks/post-update.secondary ]
|
||||||
then
|
then
|
||||||
|
|
18
src/gl-setup
18
src/gl-setup
|
@ -27,20 +27,20 @@ if [ -n "$pubkey_file" ]
|
||||||
then
|
then
|
||||||
echo $pubkey_file | grep '.pub$' >/dev/null || die "$pubkey_file must end in .pub"
|
echo $pubkey_file | grep '.pub$' >/dev/null || die "$pubkey_file must end in .pub"
|
||||||
[ -f $pubkey_file ] || die "cant find $pubkey_file"
|
[ -f $pubkey_file ] || die "cant find $pubkey_file"
|
||||||
admin_name=$(basename $pubkey_file .pub)
|
admin_name=` basename $pubkey_file .pub`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f ~/.gitolite.rc ]
|
if [ -f $HOME/.gitolite.rc ]
|
||||||
then
|
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 /^\$/;' < $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
|
comm -23 .newvars .oldvars > .diffvars
|
||||||
if [ -s .diffvars ]
|
if [ -s .diffvars ]
|
||||||
then
|
then
|
||||||
cp $GL_PACKAGE_CONF/example.gitolite.rc ~/.gitolite.rc.new
|
cp $GL_PACKAGE_CONF/example.gitolite.rc $HOME/.gitolite.rc.new
|
||||||
echo new version of the rc file saved in ~/.gitolite.rc.new
|
echo new version of the rc file saved in $HOME/.gitolite.rc.new
|
||||||
echo
|
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 controlled by any of the following variables:
|
||||||
echo ----
|
echo ----
|
||||||
sed -e 's/^/ /' < .diffvars
|
sed -e 's/^/ /' < .diffvars
|
||||||
|
@ -49,7 +49,7 @@ then
|
||||||
rm -f .newvars .oldvars .diffvars
|
rm -f .newvars .oldvars .diffvars
|
||||||
else
|
else
|
||||||
[ -n "$pubkey_file" ] || die "looks like first run -- I need a pubkey file"
|
[ -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
|
fi
|
||||||
|
|
||||||
# setup ssh stuff. We break our normal rule that we will not fiddle with
|
# 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-install -q
|
||||||
|
|
||||||
GL_ADMINDIR=$(cd;perl -e 'do ".gitolite.rc"; print $GL_ADMINDIR')
|
GL_ADMINDIR=` cd;perl -e 'do ".gitolite.rc"; print $GL_ADMINDIR'`
|
||||||
REPO_BASE=$( cd;perl -e 'do ".gitolite.rc"; print $REPO_BASE' )
|
REPO_BASE=` cd;perl -e 'do ".gitolite.rc"; print $REPO_BASE' `
|
||||||
|
|
||||||
[ -f $GL_ADMINDIR/conf/gitolite.conf ] || {
|
[ -f $GL_ADMINDIR/conf/gitolite.conf ] || {
|
||||||
cat <<EOF > $GL_ADMINDIR/conf/gitolite.conf
|
cat <<EOF > $GL_ADMINDIR/conf/gitolite.conf
|
||||||
|
|
Loading…
Reference in a new issue