From: Junio C Hamano Date: Tue, 14 Dec 2010 19:11:03 GMT Subject: Re: [PATCH 04/14] lib-git-svn.sh: Add check for missing mod_dav_svn module Message-ID: <7v8vzsuq48.fsf@alter.siamese.dyndns.org> In-Reply-To: <4D07B63A.2020501@ramsay1.demon.co.uk> Ramsay Jones writes: > Signed-off-by: Ramsay Jones > --- > t/lib-git-svn.sh | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh > index 919d45a..154f3d3 100644 > --- a/t/lib-git-svn.sh > +++ b/t/lib-git-svn.sh > @@ -101,6 +101,11 @@ start_httpd () { > echo >&2 'SVN_HTTPD_PORT is not defined!' > return > fi > + if test ! -e "$SVN_HTTPD_MODULE_PATH/mod_dav_svn.so" > + then > + echo >&2 'Apache module "mod_dav_svn.so" not found' > + return 1 > + fi Others seem to check with "test -f" for things like this. Also why "return 1" only on this codepath? > if test -z "$repo_base_path" > then > repo_base_path=svn > @@ -128,6 +133,7 @@ EOF > > stop_httpd () { > test -z "$SVN_HTTPD_PORT" && return > + test ! -e "$GIT_DIR/httpd.conf" && return > "$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k stop > } > > -- > 1.7.3