From b7944ed4d16f5fdd4625afe438fcb6c697760d77 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 10 Mar 2011 21:48:28 +0530 Subject: [PATCH] (minor) do not purge projects.list if GL_NO_DAEMON_NO_GITWEB set The code that sets %projlist doesn't even run if GL_NO_DAEMON_NO_GITWEB is set, so it doesn't make sense to then *use* that (empty) variable and effectively wipe out the projects.list file. Thanks to m0 for asking... --- src/gl-compile-conf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gl-compile-conf b/src/gl-compile-conf index c9f8705..6154eb7 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -549,12 +549,14 @@ for my $repo (@phy_repos) { setup_git_configs($repo, \%git_configs) if $git_configs{$repo}; } -# write out the project list -my $projlist_fh = wrap_open( ">", $PROJECTS_LIST); -for my $proj (sort keys %projlist) { - print $projlist_fh "$proj\n"; +# write out the project list, but not if GL_NO_DAEMON_NO_GITWEB is set +unless ($GL_NO_DAEMON_NO_GITWEB) { + my $projlist_fh = wrap_open( ">", $PROJECTS_LIST); + for my $proj (sort keys %projlist) { + print $projlist_fh "$proj\n"; + } + close $projlist_fh; } -close $projlist_fh; # ---------------------------------------------------------------------------- # "compile" ssh authorized_keys