instaweb: add minification awareness

This patch will cause git-instaweb to use the minified version of gitweb
support files (e.g. CSS and JavaScript) if they were generated.

Without minification awareness, generating the minified version of
gitweb's support files will generate a broken instaweb script since the
copy of gitweb.cgi will look for gitweb.min.* which will not exist.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Mark Rada
2010-04-02 20:40:33 -04:00
committed by Junio C Hamano
parent bb4bbf7582
commit 09b89d1a08
2 changed files with 14 additions and 4 deletions

View File

@ -391,18 +391,20 @@ EOFGITWEB
gitweb_css () {
cat > "$1" <<\EOFGITWEB
@@GITWEB_CSS@@
EOFGITWEB
}
gitweb_js () {
cat > "$1" <<\EOFGITWEB
@@GITWEB_JS@@
EOFGITWEB
}
gitweb_cgi "$GIT_DIR/gitweb/gitweb.cgi"
gitweb_css "$GIT_DIR/gitweb/gitweb.css"
gitweb_js "$GIT_DIR/gitweb/gitweb.js"
gitweb_css "$GIT_DIR/@@GITWEB_CSS_NAME@@"
gitweb_js "$GIT_DIR/@@GITWEB_JS_NAME@@"
case "$httpd" in
*lighttpd*)