{"thread":{"id":"13973","subject":"[RFC/PATCH] git-instaweb: added logo and favicon","startedAt":"2008-06-16T02:46:31Z","lastAt":"2008-06-16T03:13:38Z","messageCount":2,"participants":["Flavio Poletti","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"79999","messageId":"1213584391-29903-1-git-send-email-flavio@polettix.it","threadId":"13973","inReplyTo":null,"subject":"[RFC/PATCH] git-instaweb: added logo and favicon","fromName":"Flavio Poletti","fromEmail":"flavio@polettix.it","sentAt":"2008-06-16T02:46:31Z","receivedAt":"2008-06-16T02:46:31Z","isPatch":true,"sender":{"key":"flavio@polettix.it","avatar":"https://gravatar.com/avatar/5466f4891265e5b9f386e334a5a1100866c8a74148e8144a49e4ffef735bf22a?d=mp&s=160"},"body":"Eye candy: logo and favicon are now included in the standard\ndeployments for git-instaweb.\n\nSigned-off-by: Flavio Poletti <flavio@polettix.it>\n---\n\nI probably need a little help here to figure out how to make this\n\"portable\". I've modified Makefile, but what when configure is\ncalled by the end user instead of relying on this streamline\nMakefile? I need some hints about where to look to make this\npatch more robust regarding this.\n\nAny suggestion is welcome, of course.\n\n Makefile        |   17 +++++++++++++++--\n git-instaweb.sh |   28 ++++++++++++++++++++++++++--\n 2 files changed, 41 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 1937507..1879a34 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1104,8 +1104,16 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl\n \tchmod +x $@+ && \\\n \tmv $@+ $@\n \n-git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css\n-\t$(QUIET_GEN)$(RM) $@ $@+ && \\\n+git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/git-logo.png gitweb/git-favicon.png\n+\t$(QUIET_GEN)$(RM) $@ $@+ $@+logo $@+fav && \\\n+\t'$(PERL_PATH_SQ)' <gitweb/git-logo.png >$@+logo -l \\\n+\t    -e 'binmode STDIN;' \\\n+\t    -e 'while(read(STDIN,$$x,16))' \\\n+\t    -e '{print unpack\"H*\",$$x}' && \\\n+\t'$(PERL_PATH_SQ)' <gitweb/git-favicon.png >$@+fav -l \\\n+\t    -e 'binmode STDIN;' \\\n+\t    -e 'while(read(STDIN,$$x,16))' \\\n+\t    -e '{print unpack\"H*\",$$x}' && \\\n \tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n@@ -1113,8 +1121,13 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css\n \t    -e '/@@GITWEB_CGI@@/d' \\\n \t    -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \\\n \t    -e '/@@GITWEB_CSS@@/d' \\\n+\t    -e '/@@GITWEB_LOGO@@/r $@+logo' \\\n+\t    -e '/@@GITWEB_LOGO@@/d' \\\n+\t    -e '/@@GITWEB_FAVICON@@/r $@+fav' \\\n+\t    -e '/@@GITWEB_FAVICON@@/d' \\\n \t    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \\\n \t    $@.sh > $@+ && \\\n+\trm $@+logo $@+fav && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\n \ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex af0fde5..782256c 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -268,8 +268,32 @@ gitweb_css () {\n EOFGITWEB\n }\n \n-gitweb_cgi \"$GIT_DIR/gitweb/gitweb.cgi\"\n-gitweb_css \"$GIT_DIR/gitweb/gitweb.css\"\n+hex2bin () {\n+   \"$PERL\" -e '\n+      binmode STDOUT;\n+      while (<STDIN>) {\n+         chomp;\n+         print pack \"H*\", $_;\n+      }\n+   '\n+}\n+\n+gitweb_favicon () {\n+   hex2bin > \"$1\" <<\\EOFGITFAVICON\n+@@GITWEB_FAVICON@@\n+EOFGITFAVICON\n+}\n+\n+gitweb_logo () {\n+   hex2bin > \"$1\" <<\\EOFGITLOGO\n+@@GITWEB_LOGO@@\n+EOFGITLOGO\n+}\n+\n+gitweb_cgi     \"$GIT_DIR/gitweb/gitweb.cgi\"\n+gitweb_css     \"$GIT_DIR/gitweb/gitweb.css\"\n+gitweb_favicon \"$GIT_DIR/gitweb/git-favicon.png\"\n+gitweb_logo    \"$GIT_DIR/gitweb/git-logo.png\"\n \n case \"$httpd\" in\n *lighttpd*)\n-- \n1.5.5.4\n"},{"id":"80000","messageId":"20080616031338.GI21299@hand.yhbt.net","threadId":"13973","inReplyTo":"1213584391-29903-1-git-send-email-flavio@polettix.it","subject":"Re: [RFC/PATCH] git-instaweb: added logo and favicon","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-06-16T03:13:38Z","receivedAt":"2008-06-16T03:13:38Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Flavio Poletti <flavio@polettix.it> wrote:\n> Eye candy: logo and favicon are now included in the standard\n> deployments for git-instaweb.\n\nI've personally always considered logos and icons to be useless\nvanity items and a complete waste of pixels/bandwidth/space/memory.\n\nOthers are free to disagree with me but I'm not interested in\nhaving this supported in instaweb.\n\n-- \nEric Wong\n"}]}