X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=WiktionarySplitter.sh;h=66d38a23cfe8d20309a38b436121fd0cd8002099;hb=96e85ff86f44888a9994710d55e760893d87da76;hp=fb1ea66b435a2553b72b104013f45e59e0315d73;hpb=10986d5b49f28aadfb0a7230f400410b2ecb2d1c;p=DictionaryPC.git diff --git a/WiktionarySplitter.sh b/WiktionarySplitter.sh index fb1ea66..66d38a2 100755 --- a/WiktionarySplitter.sh +++ b/WiktionarySplitter.sh @@ -1,10 +1,12 @@ # Run after downloading (data/downloadInputs.sh) to generate # per-language data files from enwiktionary. -ICU4J=/usr/share/java/icu4j-49.1.jar -test -r "$ICU4J" || ICU4J=/usr/share/icu4j-55/lib/icu4j.jar -XERCES=/usr/share/java/xercesImpl.jar -test -r "$XERCES" || XERCES=/usr/share/xerces-2/lib/xercesImpl.jar -COMMONS_COMPRESS=/usr/share/java/commons-compress.jar -JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -test -x "$JAVA" || JAVA=java -"$JAVA" -Xmx4096m -Xverify:none -classpath bin/:"$ICU4J":"$XERCES":"$COMMONS_COMPRESS" com.hughes.android.dictionary.engine.WiktionarySplitter "$@" +RUNNER=./DictionaryPC +if ! test -x "$RUNNER" ; then + ICU4J=/usr/share/java/icu4j-49.1.jar + test -r "$ICU4J" || ICU4J=/usr/share/icu4j-55/lib/icu4j.jar + COMMONS_COMPRESS=/usr/share/java/commons-compress.jar + JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java + test -x "$JAVA" || JAVA=java + RUNNER="$JAVA -Xmx4096m -Xverify:none -classpath bin/:$ICU4J:$COMMONS_COMPRESS com.hughes.android.dictionary.engine.Runner" +fi +$RUNNER WiktionarySplitter "$@"