OSDN Git Service

PATCH: [ 1238450 ] Build script for manual at SF.net
authorTim Gerundt <tim@gerundt.de>
Wed, 20 Jul 2005 21:13:29 +0000 (21:13 +0000)
committerTim Gerundt <tim@gerundt.de>
Wed, 20 Jul 2005 21:13:29 +0000 (21:13 +0000)
Docs/Developers/readme-manual.html
Docs/Developers/readme.txt
Docs/Users/Manual/build/build.sh [new file with mode: 0644]
Docs/Users/Manual/readme.txt

index 22b668f..8b55f7f 100644 (file)
       border-left: 4px solid #FFCC00;
       border-bottom: 1px solid #FFCC00;
     }
+    h4 {
+      padding: 2px;
+      border-left: 8px solid #FF9933;
+      border-bottom: 1px solid #FF9933;
+    }
     pre {
       margin-left: 25px;
       margin-right: 25px;
@@ -131,5 +136,24 @@ local path. Replace url in second line <code>"http://www.oasis-open.org/docbook/
 </code> with valid path. At the moment it is:</p>
 
 <pre>"/usr/share/sgml/docbook/sgml-dtd-4.2-1.0-24/docbook.dtd"</pre>
+
+<h4>Own build script</h4>
+<p>We have an own build script, which replace the <code>docbook.dtd</code> url automatically and do some other works too.</p>
+
+<p>The <code>build.sh</code> script file is located at the <code>build</code> subdirectory at the <code>Manual</code> directory.
+But before you can use it at the shell server, you must give execute rights to the file:</p>
+<pre>chmod +x build.sh</pre>
+
+<p>Now you can call the script file (from the <code>build</code> directory):</p>
+<dl>
+  <dt><code>./build.sh html</code></dt>
+  <dd>Creates the HTML files under the <code>html</code> subdirectory at the <code>build</code> directory.</dd>
+  <dt><code>./build.sh pdf</code></dt>
+  <dd>Creates the PDF file under the <code>pdf</code> subdirectory at the <code>build</code> directory.</dd>
+  <dt><code>./build.sh txt</code></dt>
+  <dd>Creates the TXT file under the <code>txt</code> subdirectory at the <code>build</code> directory.</dd>
+  <dt><code>./build.sh</code></dt>
+  <dd>Is the same like <code>./build.sh html</code>.</dd>
+</dl>
 </body>
 </html>
\ No newline at end of file
index 6719c5b..7688ea1 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-20 Tim
+ PATCH: [ 1238450 ] Build script for manual at SF.net
+  Developers: readme-manual.html
+
 2005-06-02 Tim
  RFE: [ 1017179 ] Plugin readme's as HTML?
   Developers: new file Plugins.html
diff --git a/Docs/Users/Manual/build/build.sh b/Docs/Users/Manual/build/build.sh
new file mode 100644 (file)
index 0000000..a52370a
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+html_stylesheet=../Manual-html.dsl
+html_inputfile=../WinMerge_help.xml
+html_outputdir=html
+
+pdf_stylesheet=../Manual-html.dsl
+pdf_inputfile=../WinMerge_help.xml
+pdf_outputdir=pdf
+
+txt_stylesheet=../Manual-html.dsl
+txt_inputfile=../WinMerge_help.xml
+txt_outputdir=txt
+
+function patch_inputfile {
+  sed -e 's/http:\/\/www\.oasis-open\.org\/docbook\/xml\/4\.2\/docbookx\.dtd/\/usr\/share\/sgml\/docbook\/sgml-dtd-4\.2-1\.0-24\/docbook\.dtd/g' "$1" > "$1.tmp"
+  mv "$1.tmp" "$1"
+}
+
+function create_dir {
+  if ! [ -d "$1" ]; then
+    mkdir "$1"
+  fi
+}
+
+if [ "$1" = "html" ] || [ "$1" = "" ]; then #HTML files...
+  create_dir $html_outputdir
+  
+  echo "Patch inputfile..."
+  patch_inputfile $html_inputfile
+  
+  echo "Copy images..."
+  create_dir $html_outputdir/images
+  cp ../images/*.gif $html_outputdir/images/.
+  
+  echo "Copy screenshots..."
+  create_dir $html_outputdir/screenshots
+  cp ../screenshots/*.* $html_outputdir/screenshots/.
+  
+  echo "Create HTML files..."
+  docbook2html -d "$html_stylesheet" -o "$html_outputdir" "$html_inputfile"
+  
+  echo "Finished!"
+  
+elif [ "$1" = "pdf" ]; then #PDF file...
+  create_dir $pdf_outputdir
+  
+  echo "Patch inputfile..."
+  patch_inputfile $pdf_inputfile
+  
+  echo "Create PDF file..."
+  docbook2pdf -d "$pdf_stylesheet" -o "$pdf_outputdir" "$pdf_inputfile"
+  
+  echo "Finished!"
+  
+elif [ "$1" = "txt" ]; then #TXT file...
+  create_dir $txt_outputdir
+  
+  echo "Patch inputfile..."
+  patch_inputfile $txt_inputfile
+  
+  echo "Create TXT file..."
+  docbook2txt -d "$txt_stylesheet" -o "$txt_outputdir" "$txt_inputfile"
+
+  echo "Finished!"
+  
+else
+  echo "Syntax: build [html|pdf|txt]"
+fi
\ No newline at end of file
index 12df2ca..d090ca7 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-20 Tim
+ PATCH: [ 1238450 ] Build script for manual at SF.net
+  Manual/build: new file build.sh
+
 2005-07-12 Perry
  Grammar fix via rewrite for /ub option
   Manual: Command_line.xml