# HG changeset patch # User František Kučera # Date 1373492976 -7200 # Node ID f29d2ac58ed63965685e4338a18670bc0a36307b # Parent e003e66c97522695dffff8b5d87d0bdaae1b6562 build script diff -r e003e66c9752 -r f29d2ac58ed6 .hgignore --- a/.hgignore Wed Jul 10 23:49:20 2013 +0200 +++ b/.hgignore Wed Jul 10 23:49:36 2013 +0200 @@ -1,3 +1,6 @@ +syntax: glob + +*~ temp/* delivery/* data/schemas.xml diff -r e003e66c9752 -r f29d2ac58ed6 build.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build.sh Wed Jul 10 23:49:36 2013 +0200 @@ -0,0 +1,50 @@ +#!/bin/bash + +# Free Telco Dictionary +# Copyright © 2013 František Kučera (frantovo.cz) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# Script for generating deliverables: +# packed dictionary data in StarDict format + + +JAR="dist/dictionary-generator.jar" +GENERATOR_DIR="java/dictionary-generator" +WORK_DIR="free-telco-dictionary" + +function package() { + DELIVERY_DIR="../../delivery" + rm -rf $DELIVERY_DIR/$WORK_DIR + java -jar $JAR $1 + pushd $DELIVERY_DIR + (echo -n "Mercurial: "; hg identify || echo "n/a"; echo -n "Generated: "; date --rfc-3339=seconds) > $WORK_DIR/version.txt + tar czf $2.tar.gz $WORK_DIR + popd +} + +pushd `dirname $0`/$GENERATOR_DIR + +# build the generator if needed +if [ ! -f $JAR ]; then + ant; +fi + +# generate packages in multiple formats +package m free-telco-dictionary.text # plain text +package h free-telco-dictionary.xhtml # rich text + +popd + diff -r e003e66c9752 -r f29d2ac58ed6 java/dictionary-generator/concept.h.xsl --- a/java/dictionary-generator/concept.h.xsl Wed Jul 10 23:49:20 2013 +0200 +++ b/java/dictionary-generator/concept.h.xsl Wed Jul 10 23:49:36 2013 +0200 @@ -43,7 +43,7 @@ font-size: 80%; } - +
diff -r e003e66c9752 -r f29d2ac58ed6 java/dictionary-generator/src/cz/frantovo/telco/dictionary/Generator.java --- a/java/dictionary-generator/src/cz/frantovo/telco/dictionary/Generator.java Wed Jul 10 23:49:20 2013 +0200 +++ b/java/dictionary-generator/src/cz/frantovo/telco/dictionary/Generator.java Wed Jul 10 23:49:36 2013 +0200 @@ -205,7 +205,7 @@ public static void main(String[] args) { File outputFolder = new File("../../delivery/free-telco-dictionary"); - outputFolder.mkdir(); + outputFolder.mkdirs(); try { Generator g = new Generator(parseMode(args));