diff options
author | Eirik Nygaard <eirik@yahoo-inc.com> | 2016-06-23 08:57:09 +0200 |
---|---|---|
committer | Eirik Nygaard <eirik@yahoo-inc.com> | 2016-06-23 13:57:33 +0200 |
commit | 2e98f8a8ff590034973b2381c42b048779a919a5 (patch) | |
tree | a101493f172d2a2b677a59645c8b584598a978aa /bootstrap.sh | |
parent | 2d17cac23a7b62b81b22fe8df32ff0fb481e8233 (diff) |
Support java as a bootstrap mode
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-x | bootstrap.sh | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 2c896ec868d..d3494db68e3 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,10 +1,28 @@ #!/bin/bash -e # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -FULL=false +usage() { + echo "Usage: $0 [full | java | default]" >&2 +} + +# Build minimal set of java modules required to run cmake +MODE=default if [ "$1" = "full" ]; then - FULL=true + # Build all java modules required by C++ testing + MODE=full +elif [ "$1" = "java" ]; then + # Build minial set of java modules requires to run mvn install from the source root + MODE=java +elif [ "$1" = "default" ]; then + : +elif [ "$1" = "-h" -o "$1" = "--help" ]; then + usage + exit 0 +else + echo "Unknown argument: $1" >&2 + usage + exit 1 fi mvn_install() { @@ -29,10 +47,14 @@ for module in $MODULES; do done mvn_install -am -pl config-class-plugin -rf configgen -if $FULL; then - # Build all java modules required by C++ testing - mvn_install -am -pl filedistributionmanager,jrt,linguistics,messagebus -rf yolean -else - # Build minimal set of java modules required to run cmake - mvn_install -am -pl filedistributionmanager -rf yolean -fi + +case "$MODE" in + java) + ;; + full) + mvn_install -am -pl filedistributionmanager,jrt,linguistics,messagebus -rf yolean + ;; + default) + mvn_install -am -pl filedistributionmanager -rf yolean + ;; +esac |