{"thread":{"id":"23315","subject":"Subject: [PATCH 4/6] instaweb: add minification awareness","startedAt":"2010-04-03T00:36:23Z","lastAt":"2010-04-03T00:36:23Z","messageCount":1,"participants":["Mark Rada"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"138482","messageId":"4BB68D87.5070100@mailservices.uwaterloo.ca","threadId":"23315","inReplyTo":null,"subject":"Subject: [PATCH 4/6] instaweb: add minification awareness","fromName":"Mark Rada","fromEmail":"marada@uwaterloo.ca","sentAt":"2010-04-03T00:36:23Z","receivedAt":"2010-04-03T00:36:23Z","isPatch":true,"sender":{"key":"marada@uwaterloo.ca","avatar":"https://avatars.githubusercontent.com/u/38430?v=4"},"body":"This patch will cause git-instaweb to use the minified version of gitweb\nsupport files (e.g. CSS and JavaScript) if they were generated.\n\nWithout minification awareness, generating the minified version of\ngitweb's support files will generate a broken instaweb script since the\ncopy of gitweb.cgi will look for gitweb.min.* which will not exist.\n\nSigned-off-by: Mark Rada <marada@uwaterloo.ca>\n\n---\n\n\tNo changes since last revision.\n\n\n Makefile        |   12 ++++++++++--\n git-instaweb.sh |    6 ++++--\n 2 files changed, 14 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4a6bc62..af597f7 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1567,9 +1567,15 @@ gitweb:\n \n ifdef JSMIN\n GITWEB_PROGRAMS += gitweb/gitweb.min.js\n+GITWEB_JS = gitweb/gitweb.min.js\n+else\n+GITWEB_JS = gitweb/gitweb.js\n endif\n ifdef CSSMIN\n GITWEB_PROGRAMS += gitweb/gitweb.min.css\n+GITWEB_CSS = gitweb/gitweb.min.css\n+else\n+GITWEB_CSS = gitweb/gitweb.css\n endif\n OTHER_PROGRAMS +=  gitweb/gitweb.cgi  $(GITWEB_PROGRAMS)\n gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS)\n@@ -1592,11 +1598,13 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n \t    -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \\\n \t    -e '/@@GITWEB_CGI@@/d' \\\n-\t    -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \\\n+\t    -e '/@@GITWEB_CSS@@/r $(GITWEB_CSS)' \\\n \t    -e '/@@GITWEB_CSS@@/d' \\\n-\t    -e '/@@GITWEB_JS@@/r gitweb/gitweb.js' \\\n+\t    -e '/@@GITWEB_JS@@/r $(GITWEB_JS)' \\\n \t    -e '/@@GITWEB_JS@@/d' \\\n \t    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \\\n+            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \\\n+            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \\\n \t    $@.sh > $@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex 6a65f25..d4941a9 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -391,18 +391,20 @@ EOFGITWEB\n gitweb_css () {\n \tcat > \"$1\" <<\\EOFGITWEB\n @@GITWEB_CSS@@\n+\n EOFGITWEB\n }\n \n gitweb_js () {\n \tcat > \"$1\" <<\\EOFGITWEB\n @@GITWEB_JS@@\n+\n EOFGITWEB\n }\n \n gitweb_cgi \"$GIT_DIR/gitweb/gitweb.cgi\"\n-gitweb_css \"$GIT_DIR/gitweb/gitweb.css\"\n-gitweb_js  \"$GIT_DIR/gitweb/gitweb.js\"\n+gitweb_css \"$GIT_DIR/@@GITWEB_CSS_NAME@@\"\n+gitweb_js  \"$GIT_DIR/@@GITWEB_JS_NAME@@\"\n \n case \"$httpd\" in\n *lighttpd*)\n-- \n1.7.0.3.519.g7e0613\n"}]}