summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorMark Rada <marada@uwaterloo.ca>2010-04-02 20:40:33 -0400
committerJunio C Hamano <gitster@pobox.com>2010-04-02 21:23:40 -0700
commit09b89d1a082a298a182875076c068711210bb5c2 (patch)
treebe1c90185580eb3b547a46c00126ada670e77a02 /git-instaweb.sh
parentbb4bbf75829d1a6c021e34943ff4e942f064bb55 (diff)
downloadgit-09b89d1a082a298a182875076c068711210bb5c2.tar.gz
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>
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 6a65f255cc..d4941a9ce6 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -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*)