[PATCH 2/4] git-instaweb: Static files are under "static/" in gitweb_conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The variables used to compose links for gitweb static files,
i.e. @stylesheets / $stylesheet, $logo, etc. are configurable via
GITWEB_CSS, GITWEB_LOGO, etc. gitweb build configuration variables.
The installation directory of those static files is currently always
set to $(gitwebdir)/static.  Thus git-instaweb could rely on the place
where those files are installed, but not on $logo, $favicon
etc. variables.

Set @stylesheets, $logo, $favicon and $javascript to their default
values in gitweb config file for git-instaweb (in gitweb_conf
function), so that web servers invoked by git-instaweb (for example
Plack::Middleware::Static component for 'plackup' web server) can
correctly serve links to those static files.

We assume here that git-instaweb uses modern gitweb with names of
gitweb config variables as mentioned above.

Note that we had to take care that possible optional minimizations of
stylesheet and of javascript is correctly taken into account.


This is continuation of fixup for issue noticed by Tadeusz SoÅnierz
with --httpd=plackup and gitweb stylesheet (CSS).

Signed-off-by: Jakub Narebski <jnareb@xxxxxxxxx>
---
The subject (commit description) is not the best, but that is what I
was able to come up with.

This doesn't matter for default configuration and setup, but it allows
me to use my custom gitweb build configuration without any changes in
result.

 git-instaweb.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index bb57d81..da569f2 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -581,6 +581,11 @@ our \$projectroot = "$(dirname "$fqgitdir")";
 our \$git_temp = "$fqgitdir/gitweb/tmp";
 our \$projects_list = \$projectroot;
 
+our @stylesheets = ("static/".basename(\$stylesheets[0]));
+our \$logo = "static/git-logo.png";
+our \$favicon = "static/git-favicon.png";
+our \$javascript = "static/".basename(\$javascript);
+
 \$feature{'remote_heads'}{'default'} = [1];
 EOF
 }
-- 
1.7.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]