forked from languagetool-org/languagetool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·30 lines (25 loc) · 1005 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
if [ $# -lt 2 ]
then
echo "Helps building parts of LanguageTool - for a complete build, run mvn directly"
echo "Usage: `basename $0` <project> <goals...>"
echo "Examples:"
echo " ./`basename $0` languagetool-standalone clean package (will package the standalone module)"
echo " ./`basename $0` languagetool-standalone clean package -DskipTests (as above but without running tests)"
echo " ./`basename $0` en clean test (will test the English module)"
exit 1
fi
MODULE=$1
if [ \! -d $MODULE ]
then
MODULE="languagetool-language-modules/$MODULE"
fi
COMMAND="mvn --projects $MODULE --also-make ${@:2}"
echo "Running: $COMMAND"
$COMMAND
BUILDEXITCODE=$?
# these don't work on their own, so delete them to avoid confusion:
rm languagetool-standalone/target/languagetool-standalone-*.jar 2> /dev/null
rm languagetool-wikipedia/target/languagetool-wikipedia-*.jar 2> /dev/null
rm languagetool-commandline/target/languagetool-commandline-*.jar 2> /dev/null
exit $BUILDEXITCODE