source: gs2-extensions/open-office/trunk/build-srcpack/packages/COMPILE-INSTALL.sh@ 22204

Last change on this file since 22204 was 22204, checked in by davidb, 13 years ago

Initial pass at extension that uses OpenOffice to convert documents to HTML or PDF, for subsequent processing by Greenstone

File size: 848 bytes
Line 
1#!/bin/bash
2
3
4if [ ! -e "$JOD_CONVERTER" ] ; then
5 echo "Unzipping JodConverter Core"
6 unzip "$JOD_CONVERTER-dist.zip"
7
8 cd "$JOD_CONVERTER" \
9 && jar xvf "$JOD_CONVERTER-sources.jar" \
10 && cd ..
11fi
12
13
14cd "$JOD_CONVERTER"
15
16which cygpath >/dev/null 2>&1
17if [ $? = "0" ] ; then
18 # Running under cygwin
19 cp=`ls lib/*.jar | tr '\n' ';'`
20else
21 cp=`ls lib/*.jar | tr '\n' ':'`
22fi
23
24cp_with_spaces=`ls lib/*.jar | tr '\n' ' '`
25
26javac -cp ".:$cp" org/artofsolving/jodconverter/cli/Convert.java \
27 && \
28echo "Manifest-Version: 1.0" > Manifest.txt && \
29echo "Created-By: Greenstone Digital Library Project" >> Manifest.txt && \
30echo "Main-Class: org.artofsolving.jodconverter.cli.Convert" >> Manifest.txt && \
31echo "Class-Path: $cp_with_spaces" >> Manifest.txt \
32 && \
33jar cvfm jodconverter.jar Manifest.txt org lib conf document-formats.js
34
35cd ..
36
Note: See TracBrowser for help on using the repository browser.