[yelp-tools] [yelp-build] Always copy jquery.syntax.js



commit 2bb43191bddb90bd8fe4e23cad82a6dfe98b7368
Author: Shaun McCance <shaunm gnome org>
Date:   Wed Jan 5 10:20:47 2011 -0500

    [yelp-build] Always copy jquery.syntax.js
    
    Whether there are code blocks or not, it's reference from the
    script tag in the head. Not having it leads to JS warnings.

 tools/yelp-build.in |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/tools/yelp-build.in b/tools/yelp-build.in
index 890b38d..444629b 100755
--- a/tools/yelp-build.in
+++ b/tools/yelp-build.in
@@ -265,8 +265,8 @@ yelp_html_db2html () {
             cp "${yelp_icon_dir}/${icon}.png" "$html_out"
         done;
         # Copy jQuery
-        local syntax_copied="0"
         cp "${yelp_js_dir}/jquery.js" "$html_out"
+        cp "${yelp_js_dir}/jquery.syntax.js" "$html_out"
         (
             echo '<xsl:stylesheet'
             echo ' xmlns:xsl="http://www.w3.org/1999/XSL/Transform";'
@@ -292,10 +292,6 @@ yelp_html_db2html () {
         ) | xsltproc --xinclude - "$xml" | sort | uniq \
             | grep '^contents syntax ' | sed -e 's/^contents syntax brush-/brush./' \
             | while read js; do
-            if [ "x$syntax_copied" = "x0" ]; then
-                cp "${yelp_js_dir}/jquery.syntax.js" "$html_out"
-                syntax_copied=1
-            fi
             cp "${yelp_js_dir}/jquery.syntax.${js}.js" "$html_out"
         done
     done
@@ -385,8 +381,8 @@ yelp_html_page2html () {
         cp "${yelp_icon_dir}/${icon}.png" "$html_out"
     done;
     # Copy jQuery
-    local syntax_copied="0"
     cp "${yelp_js_dir}/jquery.js" "$html_out"
+    cp "${yelp_js_dir}/jquery.syntax.js" "$html_out"
     (
         echo '<xsl:stylesheet'
         echo ' xmlns:xsl="http://www.w3.org/1999/XSL/Transform";'
@@ -412,10 +408,6 @@ yelp_html_page2html () {
     ) | xsltproc --xinclude - "$xml" | sort | uniq \
         | grep '^contents syntax ' | sed -e 's/^contents syntax brush-/brush./' \
         | while read js; do
-        if [ "x$syntax_copied" = "x0" ]; then
-            cp "${yelp_js_dir}/jquery.syntax.js" "$html_out"
-            syntax_copied=1
-        fi
         cp "${yelp_js_dir}/jquery.syntax.${js}.js" "$html_out"
     done
 }



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