(minor) gl-setup learns "-q"
suppresses popping an editor when run for the first time
This commit is contained in:
parent
692552d146
commit
3c1633c659
18
src/gl-setup
18
src/gl-setup
|
@ -28,6 +28,13 @@ TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
|
||||||
export TEMPDIR
|
export TEMPDIR
|
||||||
trap "/bin/rm -rf $TEMPDIR" 0
|
trap "/bin/rm -rf $TEMPDIR" 0
|
||||||
|
|
||||||
|
# quiet mode; only used to suppress popping up an editor on a new rc file
|
||||||
|
if [ "$1" = "-q" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
quiet=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$GITOLITE_HTTP_HOME" ]
|
if [ -n "$GITOLITE_HTTP_HOME" ]
|
||||||
then
|
then
|
||||||
HOME=$GITOLITE_HTTP_HOME
|
HOME=$GITOLITE_HTTP_HOME
|
||||||
|
@ -72,10 +79,13 @@ else
|
||||||
[ -z "$GITOLITE_HTTP_HOME" ] || [ -n "$admin_name" ] || die "looks like first run -- I need an admin name"
|
[ -z "$GITOLITE_HTTP_HOME" ] || [ -n "$admin_name" ] || die "looks like first run -- I need an admin name"
|
||||||
|
|
||||||
cp $GL_PACKAGE_CONF/example.gitolite.rc $GL_RC
|
cp $GL_PACKAGE_CONF/example.gitolite.rc $GL_RC
|
||||||
printf "The default settings in the "rc" file ($GL_RC) are fine for most\n"
|
if [ -z "$quiet" ]
|
||||||
printf "people but if you wish to make any changes, you can do so now.\n\nhit enter..."
|
then
|
||||||
read i
|
printf "The default settings in the "rc" file ($GL_RC) are fine for most\n"
|
||||||
${EDITOR:-vi} $GL_RC
|
printf "people but if you wish to make any changes, you can do so now.\n\nhit enter..."
|
||||||
|
read i
|
||||||
|
${EDITOR:-vi} $GL_RC
|
||||||
|
fi
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue