summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-22 23:48:01 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-22 23:48:12 +0100
commit4aebb31a0368ecdc80086e42888a19b12095420c (patch)
tree3e1ab40e2c16e76004651af80ec640faf00a24e8
parent11f24b61fad1b5cb7c4016dc5ecfd8132a198b23 (diff)
fdo#84600 export-validation: add officeotron part
-rwxr-xr-xexport-validation/setup.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/export-validation/setup.sh b/export-validation/setup.sh
index cfbecb76..d7fe6a54 100755
--- a/export-validation/setup.sh
+++ b/export-validation/setup.sh
@@ -28,6 +28,18 @@ if ! type -p mvn >/dev/null; then
exit 1
fi
+if ! type -p ant >/dev/null; then
+ echo "Error: can't find ant in PATH"
+
+ if [ -e /etc/os-release ]; then
+ . /etc/os-release
+ if [ "$NAME" == "openSUSE" ]; then
+ echo "Hint: type 'zypper in ant-junit' to install it."
+ fi
+ fi
+ exit 1
+fi
+
instdir="$2"
if [ ! -d "$instdir" ]; then
echo "Error: please create '$instdir'."
@@ -57,4 +69,22 @@ java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=or
EOF
chmod +x odfvalidator
+# OOXML validation
+
+cd "$workdir"
+if [ ! -d officeotron ]; then
+ svn co http://officeotron.googlecode.com/svn/trunk officeotron
+fi
+cd officeotron
+if [ ! -e dist/officeotron-*.jar ]; then
+ ant
+fi
+
+cd "$instdir"
+cat > officeotron << EOF
+#!/usr/bin/env bash
+java -jar $workdir/officeotron/dist/officeotron-*.jar "\$@"
+EOF
+chmod +x officeotron
+
# vi:set shiftwidth=4 expandtab: