diff --git a/.gitignore b/.gitignore index 80616f9..f31710f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,12 +5,15 @@ .gradle/ build/ .sandbox/ +.sandbox-*/ *.log *.bak tmp.* *.swp +*.iml + .idea/* !.idea/externalDependencies.xml !.idea/vcs.xml diff --git a/.idea/dictionaries/borz.xml b/.idea/dictionaries/borz.xml new file mode 100644 index 0000000..4e33f26 --- /dev/null +++ b/.idea/dictionaries/borz.xml @@ -0,0 +1,12 @@ + + + + archlinux + nfyl + noconfirm + pacman + scversion + wget + + + \ No newline at end of file diff --git a/.idea/externalDependencies.xml b/.idea/externalDependencies.xml index 0164cba..5dd2ee0 100644 --- a/.idea/externalDependencies.xml +++ b/.idea/externalDependencies.xml @@ -2,8 +2,13 @@ + + + + + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 9f834d5..566d11e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,77 +1,650 @@ + sudo: required language: generic -services: - - docker +env: + global: + - JVM_WRAPPER_VERSION="`date +%Y%m%d_%H%M%S`" + install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap caskroom/versions; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall shellcheck bats-core; fi - # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall shellcheck; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask uninstall java; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew search java; fi - # + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker --version; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:duggan/bats; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y shellcheck bats; fi - # - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y shellcheck; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then apt-cache search oracle-; fi -# -# - git clone https://github.com/bats-core/bats-core.git && cd bats-core && ./install.sh /usr/local && ls -laFh /usr/local/bats && cd .. && rm -Rf ./bats-core/ - -script: + +before_script: + - while IFS='' read -r line || [[ -n "${line}" ]]; do eval "export ${line}"; done < "samples.properties/${ENV_TEST_FILE}.env" - env - - shellcheck src/main/bash/builder.bash || travis_terminate 1 - - src/main/bash/builder.bash || travis_terminate 1 - bats -v - - bats -p ./src/test/bash/jvmw.bats || bats -p ./src/test/bash/jvmw/*.bats || travis_terminate 1 - - cp ./build/jvmw ./ && ./jvmw java -fullversion || travis_terminate 1 - -os: - - linux - - osx + - shellcheck -V -env: - global: - - DOCKER_IMAGES="centos:centos6 centos:centos7 debian:wheezy debian:jessie ubuntu:trusty opensuse:latest base/arch:latest" - matrix: - - ENV_TEST_FILE="openjdk-12_jdk" - - ENV_TEST_FILE="openjdk-11_jdk" - - ENV_TEST_FILE="openjdk-10_jdk" - - ENV_TEST_FILE="openjdk-8_jdk" - - ENV_TEST_FILE="oracle-11_jdk" - - ENV_TEST_FILE="oracle-10_jdk" - - ENV_TEST_FILE="oracle-9_jdk" - - ENV_TEST_FILE="oracle-9.0.1_jdk" - - ENV_TEST_FILE="oracle-8_jdk" - - ENV_TEST_FILE="oracle-8u171_jdk" - - ENV_TEST_FILE="oracle-1.8.0_171_jdk" - - ENV_TEST_FILE="oracle-1.8.0_171-b11_jdk" - - ENV_TEST_FILE="oracle-8u144_jdk" +jobs: + include: -#jobs: -# include: -# - stage: before_deploy -# env: -# - DOCKER_IMAGES="" ENV_TEST_FILE="oracle-" -# - RELEASE_NUMBER=`date +%Y%m%d_%H%M%S` -# script: -# - git config --global user.name "TravisCI" -# - git config --global user.email "deploy@travis-ci.org" -# - git remote add deploy "https://TravisCI:$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG.git" -# - ./src/main/bash/builder.bash && cp ./build/jvmw ./ -# - git commit -a -m "Release $RELEASE_NUMBER" -# - git tag "$RELEASE_NUMBER" -# -# - stage: deploy -# skip_cleanup: true -# provider: releases -# api_key: "$GITHUB_TOKEN" -# files: -# - "jvmw" -# on: -# tags: true -# env: -# - DOCKER_IMAGES="" ENV_TEST_FILE="oracle-" + - stage: test + os: osx + env: + - ENV_TEST_FILE="openjdk-13" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: osx + env: + - ENV_TEST_FILE="openjdk-12" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: osx + env: + - ENV_TEST_FILE="openjdk-11" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: osx + env: + - ENV_TEST_FILE="openjdk-8" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: osx + env: + - ENV_TEST_FILE="oracle-11" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: osx + env: + - ENV_TEST_FILE="oracle-8" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + env: + - ENV_TEST_FILE="openjdk-13" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + env: + - ENV_TEST_FILE="openjdk-12" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + env: + - ENV_TEST_FILE="openjdk-11" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + env: + - ENV_TEST_FILE="openjdk-8" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + env: + - ENV_TEST_FILE="oracle-11" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + env: + - ENV_TEST_FILE="oracle-8" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-13" + - DOCKER_IMAGE="centos:centos6" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-12" + - DOCKER_IMAGE="centos:centos6" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-11" + - DOCKER_IMAGE="centos:centos6" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-8" + - DOCKER_IMAGE="centos:centos6" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-11" + - DOCKER_IMAGE="centos:centos6" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-8" + - DOCKER_IMAGE="centos:centos6" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-13" + - DOCKER_IMAGE="centos:centos7" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-12" + - DOCKER_IMAGE="centos:centos7" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-11" + - DOCKER_IMAGE="centos:centos7" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-8" + - DOCKER_IMAGE="centos:centos7" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-11" + - DOCKER_IMAGE="centos:centos7" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-8" + - DOCKER_IMAGE="centos:centos7" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-13" + - DOCKER_IMAGE="debian:wheezy" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-12" + - DOCKER_IMAGE="debian:wheezy" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-11" + - DOCKER_IMAGE="debian:wheezy" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-8" + - DOCKER_IMAGE="debian:wheezy" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-11" + - DOCKER_IMAGE="debian:wheezy" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-8" + - DOCKER_IMAGE="debian:wheezy" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-13" + - DOCKER_IMAGE="debian:jessie" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-12" + - DOCKER_IMAGE="debian:jessie" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-11" + - DOCKER_IMAGE="debian:jessie" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-8" + - DOCKER_IMAGE="debian:jessie" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-11" + - DOCKER_IMAGE="debian:jessie" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-8" + - DOCKER_IMAGE="debian:jessie" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-13" + - DOCKER_IMAGE="ubuntu:trusty" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-12" + - DOCKER_IMAGE="ubuntu:trusty" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-11" + - DOCKER_IMAGE="ubuntu:trusty" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-8" + - DOCKER_IMAGE="ubuntu:trusty" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-11" + - DOCKER_IMAGE="ubuntu:trusty" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-8" + - DOCKER_IMAGE="ubuntu:trusty" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-13" + - DOCKER_IMAGE="opensuse:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-12" + - DOCKER_IMAGE="opensuse:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-11" + - DOCKER_IMAGE="opensuse:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-8" + - DOCKER_IMAGE="opensuse:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-11" + - DOCKER_IMAGE="opensuse:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-8" + - DOCKER_IMAGE="opensuse:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-13" + - DOCKER_IMAGE="base/archlinux:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-12" + - DOCKER_IMAGE="base/archlinux:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-11" + - DOCKER_IMAGE="base/archlinux:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="openjdk-8" + - DOCKER_IMAGE="base/archlinux:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-11" + - DOCKER_IMAGE="base/archlinux:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + + - stage: test + os: linux + services: + - docker + env: + - ENV_TEST_FILE="oracle-8" + - DOCKER_IMAGE="base/archlinux:latest" + script: + - cd ./wrapper-sh/ + - ./src/test/bash/test_docker_suite.sh + - cd $TRAVIS_BUILD_DIR + \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6784533 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +WORKING_DIR=$(shell echo "`pwd`") +JVM_WRAPPER_VERSION?=$(shell echo "`date +%Y%m%d_%H%M%S`") +ENV_TEST_FILE?=openjdk-8 + +include samples.properties/$(ENV_TEST_FILE).env + +export JVM_WRAPPER_VERSION +export ENV_TEST_FILE + +prepare_core: + env + @echo "WORKING_DIR=$(WORKING_DIR)" + echo "$(JVM_WRAPPER_VERSION)" > $(WORKING_DIR)/version.txt + +prepare_sh: prepare_core + bats -v + shellcheck -V + +build_sh: prepare_sh + cd wrapper-sh && \ + shellcheck builder.bash && \ + bash builder.bash + +check_sh: build_sh + cd wrapper-sh && \ + bats -p src/test/bash/jvmw.bats && \ + bats -p src/test/bash/jvmw/*.bats + +prepare_plugin: check_sh + cp wrapper-sh/build/jvmw ./ diff --git a/README.md b/README.md index fe07793..4aaf728 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,18 @@ ![Support Linux](https://img.shields.io/badge/support%20OS-Linux-green.svg?style=flat-square) ![Support Mac OS](https://img.shields.io/badge/support%20OS-Mac%20OS-green.svg?style=flat-square) -![Support OpenJDK 12](https://img.shields.io/badge/support%20OpenJDK-12-green.svg?style=flat-square) -![Support OpenJDK 11](https://img.shields.io/badge/support%20OpenJDK-11-green.svg?style=flat-square) -![Support OpenJDK 10](https://img.shields.io/badge/support%20OpenJDK-10-green.svg?style=flat-square) -![Support OpenJDK 0](https://img.shields.io/badge/support%20OpenJDK-8-green.svg?style=flat-square) - -![Support Oracle JDK 11](https://img.shields.io/badge/support%20Oracle%20JDK-11-green.svg?style=flat-square) -![Support Oracle JDK 10](https://img.shields.io/badge/support%20Oracle%20JDK-10-green.svg?style=flat-square) -![Support Oracle JDK 9](https://img.shields.io/badge/support%20Oracle%20JDK-9-green.svg?style=flat-square) -![Support Oracle JDK 8](https://img.shields.io/badge/support%20Oracle%20JDK-8-green.svg?style=flat-square) +![OpenJDK 13](https://img.shields.io/badge/OpenJDK-13-green.svg?style=flat-square) +![OpenJDK 12](https://img.shields.io/badge/OpenJDK-12-green.svg?style=flat-square) +![OpenJDK 11](https://img.shields.io/badge/OpenJDK-11-green.svg?style=flat-square) +![OpenJDK 10](https://img.shields.io/badge/OpenJDK-10-green.svg?style=flat-square) +![OpenJDK 8](https://img.shields.io/badge/OpenJDK-8-green.svg?style=flat-square) + +![Oracle JDK 11](https://img.shields.io/badge/Oracle%20JDK-11-green.svg?style=flat-square) +![Oracle JDK 8](https://img.shields.io/badge/Oracle%20JDK-8-green.svg?style=flat-square) + + +## Testing in docker images +`centos:centos6`, `centos:centos7`, `debian:wheezy`, `debian:jessie`, `ubuntu:trusty`, `opensuse:latest`, `base/archlinux:latest` ## Install diff --git a/jvmw b/jvmw index 26c4f94..de0176b 100755 --- a/jvmw +++ b/jvmw @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Build date: 20181119_065300 +# Build date: 20190113_175926 # # Hack for code verification JVM_VERSION_MAJOR=${JVM_VERSION_MAJOR} @@ -39,7 +39,7 @@ REQUIRED_COMMANDS_CORE='awk tr head rm mv cd curl readlink dirname' REQUIRED_COMMANDS_DARWIN='hdiutil xar cpio shasum' REQUIRED_COMMANDS_LINUX='sha256sum tar' function log_2() { - if [[ ! -z "$1" ]]; then + if [[ -n "$1" ]]; then printf "[%s] [%s" "$1" "${BASH_SOURCE[1]}" for i in "${!FUNCNAME[@]}"; do printf ":%s(%s)" "${FUNCNAME[$i]}" "${BASH_LINENO[$i]}" @@ -110,7 +110,7 @@ function system_check_program_exists() { } function properties_parser() { while IFS='=' read -r key value || [[ -n "$key" ]]; do - [[ ! -z "${key}" ]] && [[ -z "${!key}" ]] && { debug "${key}='${value}'"; eval "${key}='${value}'"; } + [[ -n "${key}" ]] && [[ -z "${!key}" ]] && { debug "${key}='${value}'"; eval "${key}='${value}'"; } done <<<"$1" } function properties_default() { @@ -140,7 +140,7 @@ function properties_build() { JVM_FULL_NAME="${JVM_VENDOR}-jdk-" if [[ ${JVM_VERSION_MAJOR} -lt 9 ]]; then JVM_FULL_NAME="${JVM_FULL_NAME}${JVM_VERSION_MAJOR}" - if [[ ! -z "${JVM_VERSION_UPDATE}" ]]; then + if [[ -n "${JVM_VERSION_UPDATE}" ]]; then JVM_FULL_NAME="${JVM_FULL_NAME}u${JVM_VERSION_UPDATE}" fi else @@ -205,8 +205,8 @@ function unpack_tar_gz() { die 'error move unpacked jdk...'; } rm -Rf "${tmp_dir}" if [[ -d "${JDK_ROOT_DIR}/Contents" ]]; then - mv ${JDK_ROOT_DIR}/Contents/* ${JDK_ROOT_DIR}/ - rm -Rf ${JDK_ROOT_DIR}/Contents/ + mv "${JDK_ROOT_DIR}"/Contents/* "${JDK_ROOT_DIR}/" + rm -Rf "${JDK_ROOT_DIR}"/Contents/ fi } function unpack_dmg() { @@ -255,7 +255,7 @@ function ont_form_data_build() { for fld in $(echo "$1" | awk '{ if (match($0, "=\"([^\"]+)/) { print substr($0, RSTART+14, RLENGTH-14) }')" fi - if [[ ! -z "${ORACLE_USER}" ]]; then + if [[ -n "${ORACLE_USER}" ]]; then ORACLE_PASSWORD="$(security 2>&1 find-generic-password -g -a "${ORACLE_USER}" | awk 'match($0, /password: \"([^\"]+)/) { print substr($0, RSTART+11, RLENGTH-11) }')" fi ;; @@ -336,7 +336,9 @@ function oracle_download_jdk() { ls -laFh "${ARCHIVE_FILE}" fi # - if [[ ! `check_checksum` ]]; then + check_checksum + local status=$? + if [[ ${status} -ne 0 ]]; then die fi } @@ -363,7 +365,7 @@ function oracle_otn_page_latest_version_jdk_page_parser() { JVM_PAGE_URL=https://www.oracle.com$(curl -s https://www.oracle.com/technetwork/java/javase/downloads/index.html | awk 'match($0, /(\/technetwork\/java\/javase\/downloads\/jdk'"${JVM_VERSION_MAJOR}"'-downloads-[^\"]+)/) { print substr($0, RSTART, RLENGTH) }' | head -1) if [[ "${JVM_PAGE_URL}" != "https://www.oracle.com" ]]; then oracle_otn_page_archive_jdk_parser - if [[ ! -z "${ARCHIVE_JVM_URL}" ]]; then + if [[ -n "${ARCHIVE_JVM_URL}" ]]; then return 0 fi fi @@ -440,9 +442,10 @@ function openjdk_archive_parser() { local -r content=$(curl -s "${JVM_PAGE_URL}") local awk_mask='https://download.java.net/java/.*?jdk-'${JVM_VERSION_MAJOR}'.*?'${os}'.*?-'${arch}'.*?.'${ARCHIVE_EXT}'' debug "awk_mask=${awk_mask}" - # shellcheck disable=SC2090 - ARCHIVE_JVM_URL=$(echo "${content}" | awk '{ if (match($0, "\"'${awk_mask}'\"")) print substr($0,RSTART+1, RLENGTH-2)}') + # shellcheck disable=SC2090,SC2086 + ARCHIVE_JVM_URL=$(echo "${content}" | awk '{ if (match($0, "\"'${awk_mask}'\"")) print substr($0,RSTART+1, RLENGTH-2)}' | head -n 1) if [[ ${JVM_VERSION_MAJOR} -ge 9 ]]; then + # shellcheck disable=SC2086 local -r content_url=$(echo "${content}" | awk '{ if (match($0, "\"'${awk_mask}'.sha256\"")) print substr($0,RSTART+1, RLENGTH-2)}') ARCHIVE_JVM_CHECKSUM=$(curl -s "${content_url}") fi @@ -537,7 +540,7 @@ else system_check_program_exists "${REQUIRED_COMMANDS_CORE}" "${REQUIRED_COMMANDS_LINUX}" fi if [[ "$1" == "upgrade" ]]; then - curl -sS https://raw.githubusercontent.com/itbasis/jvm-wrapper/master/jvmw >"$0" && chmod u+x "$0" + curl -sS https://raw.githubusercontent.com/itbasis/jvm-wrapper/master/jvmw >"$0" exit 0 fi main_properties diff --git a/jvmw.properties b/jvmw.properties index 146c37a..851eb46 100644 --- a/jvmw.properties +++ b/jvmw.properties @@ -1,4 +1,4 @@ -JVM_VERSION=11 +JVM_VERSION=8 JVM_VENDOR=openjdk JVMW_DEBUG=Y USE_SYSTEM_JVM=N diff --git a/samples.properties/openjdk-11.env b/samples.properties/openjdk-11.env new file mode 100644 index 0000000..25cf30e --- /dev/null +++ b/samples.properties/openjdk-11.env @@ -0,0 +1,6 @@ +JVM_VERSION=11 + +# For tests +TEST_JVM_VERSION_MAJOR=11 +TEST_TYPE=jdk +TEST_FULL_VERSION=11.0.1+13 diff --git a/samples.properties/openjdk-12.env b/samples.properties/openjdk-12.env new file mode 100644 index 0000000..4c919ff --- /dev/null +++ b/samples.properties/openjdk-12.env @@ -0,0 +1,6 @@ +JVM_VERSION=12 + +# For tests +TEST_JVM_VERSION_MAJOR=12 +TEST_TYPE=jdk +TEST_FULL_VERSION=12-ea-26 diff --git a/samples.properties/openjdk-13.env b/samples.properties/openjdk-13.env new file mode 100644 index 0000000..68b4293 --- /dev/null +++ b/samples.properties/openjdk-13.env @@ -0,0 +1,6 @@ +JVM_VERSION=13 + +# For tests +TEST_JVM_VERSION_MAJOR=13 +TEST_TYPE=jdk +TEST_FULL_VERSION=13-ea-2 diff --git a/samples.properties/openjdk-8.env b/samples.properties/openjdk-8.env new file mode 100644 index 0000000..5762db3 --- /dev/null +++ b/samples.properties/openjdk-8.env @@ -0,0 +1,6 @@ +JVM_VERSION=8 + +# For tests +TEST_JVM_VERSION_MAJOR=8 +TEST_TYPE=jdk +TEST_FULL_VERSION=1.8.0_202-ea-b03 diff --git a/samples.properties/oracle-1.8.0_171-b11.properties b/samples.properties/oracle-1.8.0_171-b11.env similarity index 59% rename from samples.properties/oracle-1.8.0_171-b11.properties rename to samples.properties/oracle-1.8.0_171-b11.env index 1c6f451..beabd91 100644 --- a/samples.properties/oracle-1.8.0_171-b11.properties +++ b/samples.properties/oracle-1.8.0_171-b11.env @@ -1 +1,2 @@ +JVM_VENDOR=oracle JVM_VERSION=1.8.0_171-b11 diff --git a/samples.properties/oracle-10.env b/samples.properties/oracle-10.env new file mode 100644 index 0000000..eb71225 --- /dev/null +++ b/samples.properties/oracle-10.env @@ -0,0 +1,5 @@ +JVM_VENDOR=oracle +JVM_VERSION=10 + +# For tests +TEST_JVM_VERSION_MAJOR=10 diff --git a/samples.properties/oracle-10.properties b/samples.properties/oracle-10.properties deleted file mode 100644 index b472f4f..0000000 --- a/samples.properties/oracle-10.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=10 \ No newline at end of file diff --git a/samples.properties/oracle-11.env b/samples.properties/oracle-11.env new file mode 100644 index 0000000..7223093 --- /dev/null +++ b/samples.properties/oracle-11.env @@ -0,0 +1,7 @@ +JVM_VENDOR=oracle +JVM_VERSION=11 + +# For tests +TEST_JVM_VERSION_MAJOR=11 +TEST_TYPE=jdk +TEST_FULL_VERSION=11.0.1+13-LTS diff --git a/samples.properties/oracle-11.properties b/samples.properties/oracle-11.properties deleted file mode 100644 index c5a818c..0000000 --- a/samples.properties/oracle-11.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=11 diff --git a/samples.properties/oracle-8.env b/samples.properties/oracle-8.env new file mode 100644 index 0000000..39b59e5 --- /dev/null +++ b/samples.properties/oracle-8.env @@ -0,0 +1,7 @@ +JVM_VENDOR=oracle +JVM_VERSION=8 + +# For tests +TEST_JVM_VERSION_MAJOR=8 +TEST_TYPE=jdk +TEST_FULL_VERSION=1.8.0_191-b12 diff --git a/samples.properties/oracle-8.properties b/samples.properties/oracle-8.properties deleted file mode 100644 index 052df40..0000000 --- a/samples.properties/oracle-8.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=8 \ No newline at end of file diff --git a/samples.properties/oracle-8u144.env b/samples.properties/oracle-8u144.env new file mode 100644 index 0000000..1114111 --- /dev/null +++ b/samples.properties/oracle-8u144.env @@ -0,0 +1,5 @@ +JVM_VENDOR=oracle +JVM_VERSION=8u144 + +# For tests +TEST_JVM_VERSION_MAJOR=8 diff --git a/samples.properties/oracle-8u144.properties b/samples.properties/oracle-8u144.properties deleted file mode 100644 index e2e56f4..0000000 --- a/samples.properties/oracle-8u144.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=8u144 \ No newline at end of file diff --git a/samples.properties/oracle-8u171.env b/samples.properties/oracle-8u171.env new file mode 100644 index 0000000..7a174ca --- /dev/null +++ b/samples.properties/oracle-8u171.env @@ -0,0 +1,5 @@ +JVM_VENDOR=oracle +JVM_VERSION=8u171 + +# For tests +TEST_JVM_VERSION_MAJOR=8 diff --git a/samples.properties/oracle-8u171.properties b/samples.properties/oracle-8u171.properties deleted file mode 100644 index 56fe118..0000000 --- a/samples.properties/oracle-8u171.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=8u171 \ No newline at end of file diff --git a/samples.properties/oracle-8u172.env b/samples.properties/oracle-8u172.env new file mode 100644 index 0000000..95fe05b --- /dev/null +++ b/samples.properties/oracle-8u172.env @@ -0,0 +1,5 @@ +JVM_VENDOR=oracle +JVM_VERSION=8u172 + +# For tests +TEST_JVM_VERSION_MAJOR=8 diff --git a/samples.properties/oracle-8u172.properties b/samples.properties/oracle-8u172.properties deleted file mode 100644 index cf0d610..0000000 --- a/samples.properties/oracle-8u172.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=8u172 \ No newline at end of file diff --git a/samples.properties/oracle-9.0.1.env b/samples.properties/oracle-9.0.1.env new file mode 100644 index 0000000..ba9052f --- /dev/null +++ b/samples.properties/oracle-9.0.1.env @@ -0,0 +1,5 @@ +JVM_VENDOR=oracle +JVM_VERSION=9.0.1 + +# For tests +TEST_JVM_VERSION_MAJOR=9 diff --git a/samples.properties/oracle-9.0.1.properties b/samples.properties/oracle-9.0.1.properties deleted file mode 100644 index 55569ed..0000000 --- a/samples.properties/oracle-9.0.1.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=9.0.1 \ No newline at end of file diff --git a/samples.properties/oracle-9.0.4.env b/samples.properties/oracle-9.0.4.env new file mode 100644 index 0000000..fb42d1e --- /dev/null +++ b/samples.properties/oracle-9.0.4.env @@ -0,0 +1,5 @@ +JVM_VENDOR=oracle +JVM_VERSION=9.0.4 + +# For tests +TEST_JVM_VERSION_MAJOR=9 diff --git a/samples.properties/oracle-9.0.4.properties b/samples.properties/oracle-9.0.4.properties deleted file mode 100644 index d965ae8..0000000 --- a/samples.properties/oracle-9.0.4.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=9.0.4 \ No newline at end of file diff --git a/samples.properties/oracle-9.env b/samples.properties/oracle-9.env new file mode 100644 index 0000000..74cf76e --- /dev/null +++ b/samples.properties/oracle-9.env @@ -0,0 +1,5 @@ +JVM_VENDOR=oracle +JVM_VERSION=9 + +# For tests +TEST_JVM_VERSION_MAJOR=9 diff --git a/samples.properties/oracle-9.properties b/samples.properties/oracle-9.properties deleted file mode 100644 index 099f2e1..0000000 --- a/samples.properties/oracle-9.properties +++ /dev/null @@ -1 +0,0 @@ -JVM_VERSION=9 \ No newline at end of file diff --git a/src/main/bash/builder.bash b/src/main/bash/builder.bash deleted file mode 100755 index 1f16f09..0000000 --- a/src/main/bash/builder.bash +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_FILE=build/jvmw - -mkdir -p build -echo '#!/usr/bin/env bash' > ${SCRIPT_FILE} - -# push build date -echo "# Build date: $(date +%Y%m%d_%H%M%S)" >> ${SCRIPT_FILE} -echo "#" >> ${SCRIPT_FILE} - -for f in 'core' 'properties' 'download' 'unpack' 'core_oracle' 'download_oracle' 'core_openjdk' 'download_openjdk' 'main'; do - awk '/^# BEGIN SCRIPT/{flag=1;next}/^# END SCRIPT/{flag=0}flag' <"src/main/bash/jvmw/${f}.bash" >> ${SCRIPT_FILE} -done - -awk 'NF' < ${SCRIPT_FILE} > t && mv t ${SCRIPT_FILE} -chmod +x ${SCRIPT_FILE} diff --git a/src/test/bash/_test_docker_suite.sh b/src/test/bash/_test_docker_suite.sh deleted file mode 100755 index 58cd114..0000000 --- a/src/test/bash/_test_docker_suite.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Hack for code verification -ENV_TEST_FILE=${ENV_TEST_FILE:?} -DOCKER_IMAGES=${DOCKER_IMAGES:?} -# - -for DOCKER_IMAGE in ${DOCKER_IMAGES}; do - docker_image=${DOCKER_IMAGE%%:*} - docker_image=${docker_image%%/*} - docker_script=${PWD}/src/test/bash/travis_ci/script_docker.${docker_image}.sh - export DOCKER_IMAGE - echo ":: DOCKER_IMAGE=${DOCKER_IMAGE}" - echo ":: :: execute '${docker_script}'..." - ${docker_script} || exit 1 - echo ":: :: done..." -done diff --git a/src/test/bash/_test_suite.sh b/src/test/bash/_test_suite.sh deleted file mode 100755 index 1922081..0000000 --- a/src/test/bash/_test_suite.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -ORIGIN_PWD=$PWD -# Hack for code verification -ENV_TEST_FILE=${ENV_TEST_FILE:?} - -# shellcheck disable=SC1090 -source "$PWD/src/test/resources/test.env/$ENV_TEST_FILE.env" - -# Hack for code verification -TEST_TYPE=${TEST_TYPE:?} -TEST_FULL_VERSION=${TEST_FULL_VERSION:?} -TEST_REUSE_JAVA_VERSION=${TEST_REUSE_JAVA_VERSION} -# - -function run_tests() { - test_script="${1}" - echo ":: execute '${test_script}'..." - - TMP_DIR=$(mktemp -d) - echo "TMP_DIR=$TMP_DIR, ORIGIN_PWD=$ORIGIN_PWD" - cd "${ORIGIN_PWD}" && ls -1 "$ORIGIN_PWD" | grep -v "build" | xargs -I find_src cp -R find_src "$TMP_DIR/" - cd "$TMP_DIR" || exit 1 - # - ${test_script} || { - rm -Rf "$TMP_DIR"; - exit 1; } - rm -Rf "$TMP_DIR" -} - -for test_script in $(find "$ORIGIN_PWD/src/test/bash" -name "${TEST_TYPE}.*.sh" -type f | sort); do - run_tests "src/${test_script##*/src/}" -done - -run_tests "./jvmw info" diff --git a/src/test/bash/travis_ci/script_docker.base.sh b/src/test/bash/travis_ci/script_docker.base.sh deleted file mode 100755 index d37c657..0000000 --- a/src/test/bash/travis_ci/script_docker.base.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Hack for code verification -DOCKER_IMAGE=${DOCKER_IMAGE:?} - -# shellcheck disable=SC2086 -docker run \ ---rm \ --it \ --e ORACLE_USER \ --e ORACLE_PASSWORD \ --e ENV_TEST_FILE \ --v "${PWD}/":/root/jvmw-prj \ - ${DOCKER_IMAGE} bash -c "export HOME=/root/jvmw-prj && cd /root/jvmw-prj && ./src/test/bash/_test_suite.sh 2>&1" diff --git a/src/test/bash/travis_ci/script_docker.centos.sh b/src/test/bash/travis_ci/script_docker.centos.sh deleted file mode 100755 index c69f3f6..0000000 --- a/src/test/bash/travis_ci/script_docker.centos.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Hack for code verification -DOCKER_IMAGE=${DOCKER_IMAGE:?} - -# shellcheck disable=SC2086 -docker run \ ---rm \ --it \ --e ORACLE_USER \ --e ORACLE_PASSWORD \ --e ENV_TEST_FILE \ --v "${PWD}/":/root/jvmw-prj \ - ${DOCKER_IMAGE} bash -c "cd /root/jvmw-prj && ./src/test/bash/_test_suite.sh 2>&1" diff --git a/src/test/bash/travis_ci/script_docker.debian.sh b/src/test/bash/travis_ci/script_docker.debian.sh deleted file mode 100755 index f66d4a3..0000000 --- a/src/test/bash/travis_ci/script_docker.debian.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Hack for code verification -DOCKER_IMAGE=${DOCKER_IMAGE:?} - -# shellcheck disable=SC2086 -docker run \ ---rm \ --it \ --e ORACLE_USER \ --e ORACLE_PASSWORD \ --e ENV_TEST_FILE \ --v "${PWD}/":/root/jvmw-prj \ - ${DOCKER_IMAGE} bash -c "apt-get update && apt-get install -y curl && cd /root/jvmw-prj && ./src/test/bash/_test_suite.sh 2>&1" diff --git a/src/test/bash/travis_ci/script_docker.opensuse.sh b/src/test/bash/travis_ci/script_docker.opensuse.sh deleted file mode 100755 index 759c25b..0000000 --- a/src/test/bash/travis_ci/script_docker.opensuse.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Hack for code verification -DOCKER_IMAGE=${DOCKER_IMAGE:?} - -# shellcheck disable=SC2086 -docker run \ ---rm \ --it \ --e ORACLE_USER \ --e ORACLE_PASSWORD \ --e ENV_TEST_FILE \ --v "${PWD}/":/root/jvmw-prj \ - ${DOCKER_IMAGE} bash -c "zypper in -nfyl curl tar && cd /root/jvmw-prj && ./src/test/bash/_test_suite.sh 2>&1" diff --git a/src/test/bash/travis_ci/script_docker.ubuntu.sh b/src/test/bash/travis_ci/script_docker.ubuntu.sh deleted file mode 100755 index dc8a6e2..0000000 --- a/src/test/bash/travis_ci/script_docker.ubuntu.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Hack for code verification -DOCKER_IMAGE=${DOCKER_IMAGE:?} - -# shellcheck disable=SC2086 -docker run \ ---rm \ --it \ --e ORACLE_USER \ --e ORACLE_PASSWORD \ --e ENV_TEST_FILE \ --v "${PWD}":"/root/jvmw-prj" \ -${DOCKER_IMAGE} bash -c "sudo apt-get update && sudo apt-get install -y curl && cd /root/jvmw-prj && ./src/test/bash/_test_suite.sh 2>&1" diff --git a/src/test/resources/test.env/openjdk-10_jdk.properties b/src/test/resources/test.env/openjdk-10_jdk.properties deleted file mode 100644 index e646a40..0000000 --- a/src/test/resources/test.env/openjdk-10_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=openjdk -TEST_JVM_VERSION=10 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=10.0.2+13 -TEST_JVM_HOME="${HOME}/.jvm/openjdk-jdk-10" -TEST_JVM_VERSION_MAJOR=10 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=77ea7675ee29b85aa7df138014790f91047bfdafbc997cb41a1030a0417356d7 -TEST_ARCHIVE_JVM_URL_darwin=https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_osx-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=f3b26abc9990a0b8929781310e14a339a7542adfd6596afb842fa0dd7e3848b2 -TEST_ARCHIVE_JVM_URL_linux=https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=d6fadd228b195f754d3bb74cb7dce7a7fdbce58963257ba2ab63a923301bc2dd -TEST_ARCHIVE_JVM_URL_windows=https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_windows-x64_bin.tar.gz diff --git a/src/test/resources/test.env/openjdk-11_jdk.properties b/src/test/resources/test.env/openjdk-11_jdk.properties deleted file mode 100644 index 20b7314..0000000 --- a/src/test/resources/test.env/openjdk-11_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=openjdk -TEST_JVM_VERSION=11 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=11+28 -TEST_JVM_HOME="${HOME}/.jvm/openjdk-jdk-11" -TEST_JVM_VERSION_MAJOR=11 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=6b969d2df6a9758d9458f5ba47939250e848dfba8b49e41c935cf210606b6d38 -TEST_ARCHIVE_JVM_URL_darwin=https://download.java.net/java/ga/jdk11/openjdk-11_osx-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=3784cfc4670f0d4c5482604c7c513beb1a92b005f569df9bf100e8bef6610f2e -TEST_ARCHIVE_JVM_URL_linux=https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=fde3b28ca31b86a889c37528f17411cd0b9651beb6fa76cac89a223417910f4b -TEST_ARCHIVE_JVM_URL_windows=https://download.java.net/java/ga/jdk11/openjdk-11_windows-x64_bin.zip diff --git a/src/test/resources/test.env/openjdk-12_jdk.properties b/src/test/resources/test.env/openjdk-12_jdk.properties deleted file mode 100644 index 1e8b2bb..0000000 --- a/src/test/resources/test.env/openjdk-12_jdk.properties +++ /dev/null @@ -1,19 +0,0 @@ -TEST_JVM_VENDOR=openjdk -TEST_JVM_VERSION=12 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=12-ea+15 -TEST_JVM_HOME="${HOME}/.jvm/openjdk-jdk-12" -TEST_JVM_VERSION_MAJOR=12 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=25f8259e2a5ee89933f63c4cb66503a2c6e86994ca3830381a4a0a3711690085 -TEST_ARCHIVE_JVM_URL_darwin=https://download.java.net/java/early_access/jdk12/14/GPL/openjdk-12-ea+15_osx-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=d5603ba136d07918e621c7ede56bbda8e76da4656d3d02874fa435a6bd69779f -TEST_ARCHIVE_JVM_URL_linux=https://download.java.net/java/early_access/jdk12/14/GPL/openjdk-12-ea+15_linux-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_alpine_linux=172c7d7c6859253822e03f0839f83627ffe06055f118423c6ef619a1af836b4c -TEST_ARCHIVE_JVM_URL_alpine_linux=https://download.java.net/java/early_access/alpine/12/binaries/openjdk-12-ea+12_linux-x64-musl_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=b41b5b427bb51d4e0193ec448ad884be1c67092dc51c5f9bd7521e7b66c60a90 -TEST_ARCHIVE_JVM_URL_windows=https://download.java.net/java/early_access/jdk12/14/GPL/openjdk-12-ea+15_windows-x64_bin.zip diff --git a/src/test/resources/test.env/openjdk-8_jdk.properties b/src/test/resources/test.env/openjdk-8_jdk.properties deleted file mode 100644 index d75be4c..0000000 --- a/src/test/resources/test.env/openjdk-8_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=openjdk -TEST_JVM_VERSION=8 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=1.8.0_192-ea-b04 -TEST_JVM_HOME="${HOME}/.jvm/openjdk-jdk-8" -TEST_JVM_VERSION_MAJOR=8 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin= -TEST_ARCHIVE_JVM_URL_darwin=https://download.java.net/java/jdk8u192/archive/b04/binaries/jdk-8u192-ea-bin-b04-macosx-x86_64-01_aug_2018.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux= -TEST_ARCHIVE_JVM_URL_linux=https://download.java.net/java/jdk8u192/archive/b04/binaries/jdk-8u192-ea-bin-b04-linux-x64-01_aug_2018.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows= -TEST_ARCHIVE_JVM_URL_windows=https://download.java.net/java/jdk8u192/archive/b04/binaries/jdk-8u192-ea-bin-b04-windows-x64-01_aug_2018.exe diff --git a/src/test/resources/test.env/oracle-1.8.0_171-b11_jdk.properties b/src/test/resources/test.env/oracle-1.8.0_171-b11_jdk.properties deleted file mode 100644 index ba35f0d..0000000 --- a/src/test/resources/test.env/oracle-1.8.0_171-b11_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=1.8.0_171-b11 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=1.8.0_171-b11 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-8u171" -TEST_JVM_VERSION_MAJOR=8 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=00ccc048009e64e7e341d55d35c8519ab63ef5f86f0d73d4e823281d0b358d40 -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-macosx-x64.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=b6dd2837efaaec4109b36cfbb94a774db100029f98b0d78be68c27bec0275982 -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=841b20e904b7f46fe7c8ce88bd35148e9663c750c8336286d0eb05a0a5b203f4 -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-windows-x64.exe diff --git a/src/test/resources/test.env/oracle-1.8.0_171_jdk.properties b/src/test/resources/test.env/oracle-1.8.0_171_jdk.properties deleted file mode 100644 index 3e84700..0000000 --- a/src/test/resources/test.env/oracle-1.8.0_171_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=1.8.0_171 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=1.8.0_171-b11 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-8u171" -TEST_JVM_VERSION_MAJOR=8 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=00ccc048009e64e7e341d55d35c8519ab63ef5f86f0d73d4e823281d0b358d40 -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-macosx-x64.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=b6dd2837efaaec4109b36cfbb94a774db100029f98b0d78be68c27bec0275982 -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=841b20e904b7f46fe7c8ce88bd35148e9663c750c8336286d0eb05a0a5b203f4 -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-windows-x64.exe diff --git a/src/test/resources/test.env/oracle-10_jdk.properties b/src/test/resources/test.env/oracle-10_jdk.properties deleted file mode 100644 index 2cb69f5..0000000 --- a/src/test/resources/test.env/oracle-10_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=10 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=10.0.2+13 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-10" -TEST_JVM_VERSION_MAJOR=10 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=2db323c9c93e7fb63e2ed7e06ce8150c32d782e3d0704be6274ebb2d298193aa -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_osx-x64_bin.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=6633c20d53c50c20835364d0f3e172e0cbbce78fff81867488f22a6298fa372b -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=bd2aa173db14789ac0369ab32bf929679760cae9e04d751d5f914ac3ad36c129 -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_windows-x64_bin.exe diff --git a/src/test/resources/test.env/oracle-11_jdk.properties b/src/test/resources/test.env/oracle-11_jdk.properties deleted file mode 100644 index 425e47c..0000000 --- a/src/test/resources/test.env/oracle-11_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=11 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=11+28 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-11" -TEST_JVM_VERSION_MAJOR=11 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=aa5fea6e2f009e63dd8a8d7f532104e6476195a49ee6dd0d2b11c64966d028cc -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn-pub/java/jdk/11+28/55eed80b163941c8885ad9298e6d786a/jdk-11_osx-x64_bin.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=246a0eba4927bf30180c573b73d55fc10e226c05b3236528c3a721dff3b50d32 -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn-pub/java/jdk/11+28/55eed80b163941c8885ad9298e6d786a/jdk-11_linux-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=d64b9d725f0ed096ae839ef8506deb3b6f509b2e3ee1f9b0792c5116623d4c9d -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn-pub/java/jdk/11+28/55eed80b163941c8885ad9298e6d786a/jdk-11_windows-x64_bin.zip diff --git a/src/test/resources/test.env/oracle-8_jdk.properties b/src/test/resources/test.env/oracle-8_jdk.properties deleted file mode 100644 index d48a32a..0000000 --- a/src/test/resources/test.env/oracle-8_jdk.properties +++ /dev/null @@ -1,17 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=8 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=1.8.0_181-b13 -TEST_REUSE_JAVA_VERSION=8u181 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-8" -TEST_JVM_VERSION_MAJOR=8 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=3ea78e0107f855b47a55414fadaabd04b94e406050d615663d54200ec85efc9b -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-macosx-x64.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz -TEST_ARCHIVE_JVM_URL_linux=1845567095bfbfebd42ed0d09397939796d05456290fb20a83c476ba09f991d3 -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=6d1e254081d56fa460505d5b0f10ce1e33426c44dfbcab838c2be620f35997a4 -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-windows-x64.exe diff --git a/src/test/resources/test.env/oracle-8u144_jdk.properties b/src/test/resources/test.env/oracle-8u144_jdk.properties deleted file mode 100644 index 23305a2..0000000 --- a/src/test/resources/test.env/oracle-8u144_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=8u144 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=1.8.0_144-b01 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-8u144" -TEST_JVM_VERSION_MAJOR=8 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=2450b35e10295ccf3fb1596bdea6f8f5670f7200ae3ac592eb6a54cc030cf94b -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-macosx-x64.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=e8a341ce566f32c3d06f6d0f0eeea9a0f434f538d22af949ae58bc86f2eeaae4 -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=be9f6e920f817757ce1913c9c3f0a5d63046c720f37a95e4a14450a179f48a18 -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-windows-x64.exe diff --git a/src/test/resources/test.env/oracle-8u171_jdk.properties b/src/test/resources/test.env/oracle-8u171_jdk.properties deleted file mode 100644 index 38938a5..0000000 --- a/src/test/resources/test.env/oracle-8u171_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=8u171 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=1.8.0_171-b11 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-8u171" -TEST_JVM_VERSION_MAJOR=8 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=00ccc048009e64e7e341d55d35c8519ab63ef5f86f0d73d4e823281d0b358d40 -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-macosx-x64.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=b6dd2837efaaec4109b36cfbb94a774db100029f98b0d78be68c27bec0275982 -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=841b20e904b7f46fe7c8ce88bd35148e9663c750c8336286d0eb05a0a5b203f4 -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-windows-x64.exe diff --git a/src/test/resources/test.env/oracle-9.0.1_jdk.properties b/src/test/resources/test.env/oracle-9.0.1_jdk.properties deleted file mode 100644 index 9191af3..0000000 --- a/src/test/resources/test.env/oracle-9.0.1_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=9.0.1 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=9.0.1+11 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-9.0.1" -TEST_JVM_VERSION_MAJOR=9 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=e87f9c83045f68546e78ee24a61724d06180581b0712ffdcdcac8faf6a3eca56 -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn/java/jdk/9.0.1+11/jdk-9.0.1_osx-x64_bin.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=2cdaf0ff92d0829b510edd883a4ac8322c02f2fc1beae95d048b6716076bc014 -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=4df5f74fe04c708977e23bdae8842297bce10d550e4a1cbedde9a33af56f4dab -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn/java/jdk/9.0.1+11/jdk-9.0.1_windows-x64_bin.exe diff --git a/src/test/resources/test.env/oracle-9_jdk.properties b/src/test/resources/test.env/oracle-9_jdk.properties deleted file mode 100644 index 47bb28c..0000000 --- a/src/test/resources/test.env/oracle-9_jdk.properties +++ /dev/null @@ -1,16 +0,0 @@ -TEST_JVM_VENDOR=oracle -TEST_JVM_VERSION=9.0.4 -TEST_TYPE=jvm -TEST_JVM_TYPE=jdk -TEST_FULL_VERSION=9.0.4+11 -TEST_JVM_HOME="${HOME}/.jvm/oracle-jdk-9" -TEST_JVM_VERSION_MAJOR=9 -# -TEST_ARCHIVE_JVM_CHECKSUM_darwin=f5c827ab4c3cf380827199005a3dfe8077a38c4d6e8b3fa37ec19ce6ca9aa658 -TEST_ARCHIVE_JVM_URL_darwin=http://download.oracle.com/otn/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_osx-x64_bin.dmg -# -TEST_ARCHIVE_JVM_CHECKSUM_linux=90c4ea877e816e3440862cfa36341bc87d05373d53389ec0f2d54d4e8c95daa2 -TEST_ARCHIVE_JVM_URL_linux=http://download.oracle.com/otn/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz -# -TEST_ARCHIVE_JVM_CHECKSUM_windows=56c67197a8f2f7723ffb0324191151075cdec0f0891861e36f3fadda28d556c3 -TEST_ARCHIVE_JVM_URL_windows=http://download.oracle.com/otn/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_windows-x64_bin.exe diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..a36bd99 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +20181224_133803 diff --git a/wrapper-sh/builder.bash b/wrapper-sh/builder.bash new file mode 100755 index 0000000..fabfe8e --- /dev/null +++ b/wrapper-sh/builder.bash @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +SCRIPT_FILE=./build/jvmw + +SCRIPT_PARTS="core properties download unpack core_oracle download_oracle core_openjdk download_openjdk main" + +for f in ${SCRIPT_PARTS}; do + shellcheck "./src/main/bash/${f}.bash" +done + +mkdir -p ./build +echo '#!/usr/bin/env bash' > ${SCRIPT_FILE} + +# push build date +echo "# Build date: ${JVM_WRAPPER_VERSION}" >> ${SCRIPT_FILE} +echo "#" >> ${SCRIPT_FILE} + +for f in ${SCRIPT_PARTS}; do + awk '/^# BEGIN SCRIPT/{flag=1;next}/^# END SCRIPT/{flag=0}flag' <"src/main/bash/${f}.bash" >> ${SCRIPT_FILE} +done + +awk 'NF' < ${SCRIPT_FILE} > t && mv t ${SCRIPT_FILE} + +shellcheck ${SCRIPT_FILE} + +chmod +x ${SCRIPT_FILE} diff --git a/wrapper-sh/samples.properties b/wrapper-sh/samples.properties new file mode 120000 index 0000000..755ffcc --- /dev/null +++ b/wrapper-sh/samples.properties @@ -0,0 +1 @@ +../samples.properties \ No newline at end of file diff --git a/src/main/bash/jvmw/core.bash b/wrapper-sh/src/main/bash/core.bash similarity index 99% rename from src/main/bash/jvmw/core.bash rename to wrapper-sh/src/main/bash/core.bash index 6e9c0d3..84e89ed 100644 --- a/src/main/bash/jvmw/core.bash +++ b/wrapper-sh/src/main/bash/core.bash @@ -48,7 +48,7 @@ REQUIRED_COMMANDS_DARWIN='hdiutil xar cpio shasum' REQUIRED_COMMANDS_LINUX='sha256sum tar' function log_2() { - if [[ ! -z "$1" ]]; then + if [[ -n "$1" ]]; then printf "[%s] [%s" "$1" "${BASH_SOURCE[1]}" for i in "${!FUNCNAME[@]}"; do printf ":%s(%s)" "${FUNCNAME[$i]}" "${BASH_LINENO[$i]}" diff --git a/src/main/bash/jvmw/core_openjdk.bash b/wrapper-sh/src/main/bash/core_openjdk.bash similarity index 100% rename from src/main/bash/jvmw/core_openjdk.bash rename to wrapper-sh/src/main/bash/core_openjdk.bash diff --git a/src/main/bash/jvmw/core_oracle.bash b/wrapper-sh/src/main/bash/core_oracle.bash similarity index 100% rename from src/main/bash/jvmw/core_oracle.bash rename to wrapper-sh/src/main/bash/core_oracle.bash diff --git a/src/main/bash/jvmw/download.bash b/wrapper-sh/src/main/bash/download.bash similarity index 100% rename from src/main/bash/jvmw/download.bash rename to wrapper-sh/src/main/bash/download.bash diff --git a/src/main/bash/jvmw/download_openjdk.bash b/wrapper-sh/src/main/bash/download_openjdk.bash similarity index 94% rename from src/main/bash/jvmw/download_openjdk.bash rename to wrapper-sh/src/main/bash/download_openjdk.bash index fc1fdb6..57ed625 100644 --- a/src/main/bash/jvmw/download_openjdk.bash +++ b/wrapper-sh/src/main/bash/download_openjdk.bash @@ -63,10 +63,11 @@ function openjdk_archive_parser() { local awk_mask='https://download.java.net/java/.*?jdk-'${JVM_VERSION_MAJOR}'.*?'${os}'.*?-'${arch}'.*?.'${ARCHIVE_EXT}'' debug "awk_mask=${awk_mask}" - # shellcheck disable=SC2090 - ARCHIVE_JVM_URL=$(echo "${content}" | awk '{ if (match($0, "\"'${awk_mask}'\"")) print substr($0,RSTART+1, RLENGTH-2)}') + # shellcheck disable=SC2090,SC2086 + ARCHIVE_JVM_URL=$(echo "${content}" | awk '{ if (match($0, "\"'${awk_mask}'\"")) print substr($0,RSTART+1, RLENGTH-2)}' | head -n 1) if [[ ${JVM_VERSION_MAJOR} -ge 9 ]]; then + # shellcheck disable=SC2086 local -r content_url=$(echo "${content}" | awk '{ if (match($0, "\"'${awk_mask}'.sha256\"")) print substr($0,RSTART+1, RLENGTH-2)}') ARCHIVE_JVM_CHECKSUM=$(curl -s "${content_url}") fi diff --git a/src/main/bash/jvmw/download_oracle.bash b/wrapper-sh/src/main/bash/download_oracle.bash similarity index 96% rename from src/main/bash/jvmw/download_oracle.bash rename to wrapper-sh/src/main/bash/download_oracle.bash index aba7234..d47a29c 100644 --- a/src/main/bash/jvmw/download_oracle.bash +++ b/wrapper-sh/src/main/bash/download_oracle.bash @@ -40,7 +40,7 @@ function ont_form_data_build() { fld_name=$(echo "${fld}" | awk 'match($0, /name="([^"]+)/) { print substr($0, RSTART+6, RLENGTH-6) }') fld_value=$(echo "${fld}" | awk 'match($0, /value="([^"]+)/) { print substr($0, RSTART+7, RLENGTH-7) }') - if [[ ! -z "${fld_name}" ]]; then + if [[ -n "${fld_name}" ]]; then if [[ "${fld_name}" == "userid" ]]; then fld_value=${ORACLE_USER} elif [[ "${fld_name}" == "pass" ]]; then @@ -88,10 +88,10 @@ function oracle_otn_login() { if [[ -z "${ORACLE_USER}" ]] || [[ -z "${ORACLE_PASSWORD}" ]]; then case "${OS}" in darwin) - if [[ ! -z "${JVMW_ORACLE_KEYCHAIN}" ]]; then + if [[ -n "${JVMW_ORACLE_KEYCHAIN}" ]]; then ORACLE_USER="$(security 2>&1 find-generic-password -l "${JVMW_ORACLE_KEYCHAIN}" | awk 'match($0, /\"acct\"=\"([^\"]+)/) { print substr($0, RSTART+14, RLENGTH-14) }')" fi - if [[ ! -z "${ORACLE_USER}" ]]; then + if [[ -n "${ORACLE_USER}" ]]; then ORACLE_PASSWORD="$(security 2>&1 find-generic-password -g -a "${ORACLE_USER}" | awk 'match($0, /password: \"([^\"]+)/) { print substr($0, RSTART+11, RLENGTH-11) }')" fi ;; @@ -135,8 +135,9 @@ function oracle_download_jdk() { ls -laFh "${ARCHIVE_FILE}" fi # - - if [[ ! `check_checksum` ]]; then + check_checksum + local status=$? + if [[ ${status} -ne 0 ]]; then die fi } @@ -169,7 +170,7 @@ function oracle_otn_page_latest_version_jdk_page_parser() { if [[ "${JVM_PAGE_URL}" != "https://www.oracle.com" ]]; then oracle_otn_page_archive_jdk_parser - if [[ ! -z "${ARCHIVE_JVM_URL}" ]]; then + if [[ -n "${ARCHIVE_JVM_URL}" ]]; then return 0 fi fi diff --git a/src/main/bash/jvmw/main.bash b/wrapper-sh/src/main/bash/main.bash similarity index 99% rename from src/main/bash/jvmw/main.bash rename to wrapper-sh/src/main/bash/main.bash index 14f6602..408e816 100644 --- a/src/main/bash/jvmw/main.bash +++ b/wrapper-sh/src/main/bash/main.bash @@ -15,6 +15,7 @@ REQUIRED_COMMANDS_CORE=${REQUIRED_COMMANDS_CORE} REQUIRED_COMMANDS_DARWIN=${REQUIRED_COMMANDS_DARWIN} REQUIRED_COMMANDS_LINUX=${REQUIRED_COMMANDS_LINUX} LAST_UPDATE_FILE=${LAST_UPDATE_FILE} +REQUIRED_UPDATE=${REQUIRED_UPDATE} # BEGIN SCRIPT diff --git a/src/main/bash/jvmw/properties.bash b/wrapper-sh/src/main/bash/properties.bash similarity index 81% rename from src/main/bash/jvmw/properties.bash rename to wrapper-sh/src/main/bash/properties.bash index 90cdac0..1a63066 100644 --- a/src/main/bash/jvmw/properties.bash +++ b/wrapper-sh/src/main/bash/properties.bash @@ -5,11 +5,14 @@ OS=${OS} JVMW_HOME=${JVMW_HOME} JVM_VERSION=${JVM_VERSION} JVM_VENDOR=${JVM_VENDOR} +ARCHIVE_FILE=${ARCHIVE_FILE} +ARCHIVE_EXT=${ARCHIVE_EXT} +LAST_UPDATE_FILE=${LAST_UPDATE_FILE} # BEGIN SCRIPT function properties_parser() { while IFS='=' read -r key value || [[ -n "$key" ]]; do - [[ ! -z "${key}" ]] && [[ -z "${!key}" ]] && { debug "${key}='${value}'"; eval "${key}='${value}'"; } + [[ -n "${key}" ]] && [[ -z "${!key}" ]] && { debug "${key}='${value}'"; eval "${key}='${value}'"; } done <<<"$1" } @@ -42,7 +45,7 @@ function properties_build() { JVM_FULL_NAME="${JVM_VENDOR}-jdk-" if [[ ${JVM_VERSION_MAJOR} -lt 9 ]]; then JVM_FULL_NAME="${JVM_FULL_NAME}${JVM_VERSION_MAJOR}" - if [[ ! -z "${JVM_VERSION_UPDATE}" ]]; then + if [[ -n "${JVM_VERSION_UPDATE}" ]]; then JVM_FULL_NAME="${JVM_FULL_NAME}u${JVM_VERSION_UPDATE}" fi else @@ -57,5 +60,7 @@ function properties_build() { JDK_HOME_DIR=${JDK_ROOT_DIR}/$([[ "${OS}" == 'darwin' ]] && echo 'Home/') } - # END SCRIPT + +# Hack for code verification +export ARCHIVE_FILE LAST_UPDATE_FILE JDK_HOME_DIR diff --git a/src/main/bash/jvmw/unpack.bash b/wrapper-sh/src/main/bash/unpack.bash similarity index 95% rename from src/main/bash/jvmw/unpack.bash rename to wrapper-sh/src/main/bash/unpack.bash index 92698fa..04f932a 100644 --- a/src/main/bash/jvmw/unpack.bash +++ b/wrapper-sh/src/main/bash/unpack.bash @@ -32,8 +32,8 @@ function unpack_tar_gz() { rm -Rf "${tmp_dir}" if [[ -d "${JDK_ROOT_DIR}/Contents" ]]; then - mv ${JDK_ROOT_DIR}/Contents/* ${JDK_ROOT_DIR}/ - rm -Rf ${JDK_ROOT_DIR}/Contents/ + mv "${JDK_ROOT_DIR}"/Contents/* "${JDK_ROOT_DIR}/" + rm -Rf "${JDK_ROOT_DIR}"/Contents/ fi } diff --git a/src/test/bash/_test_core.sh b/wrapper-sh/src/test/bash/_test_core.sh similarity index 100% rename from src/test/bash/_test_core.sh rename to wrapper-sh/src/test/bash/_test_core.sh diff --git a/wrapper-sh/src/test/bash/docker_tests.sh b/wrapper-sh/src/test/bash/docker_tests.sh new file mode 100755 index 0000000..1310581 --- /dev/null +++ b/wrapper-sh/src/test/bash/docker_tests.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Shellcheck +scversion="latest" +wget "https://storage.googleapis.com/shellcheck/shellcheck-${scversion}.linux.x86_64.tar.xz" +tar --xz -xvf shellcheck-"${scversion}".linux.x86_64.tar.xz +cp shellcheck-"${scversion}"/shellcheck /usr/bin/ +shellcheck --version + +# Bats +mkdir -p /opt/bats && git clone https://github.com/bats-core/bats-core.git && cd bats-core && ./install.sh /usr/local +bats -v + +# +cd /opt/jvmw-prj && ./src/test/bash/test_suite.sh 2>&1 diff --git a/src/test/bash/jvmw.bats b/wrapper-sh/src/test/bash/jvmw.bats similarity index 58% rename from src/test/bash/jvmw.bats rename to wrapper-sh/src/test/bash/jvmw.bats index 87352ed..3a3f4bf 100644 --- a/src/test/bash/jvmw.bats +++ b/wrapper-sh/src/test/bash/jvmw.bats @@ -1,12 +1,12 @@ #!/usr/bin/env bats setup() { - while IFS='' read -r line || [[ -n "$line" ]]; do - eval "export $line" - done < "src/test/resources/test.env/$ENV_TEST_FILE.properties" +# while IFS='' read -r line || [[ -n "$line" ]]; do +# eval "export $line" +# done < "src/test/resources/test.env/$ENV_TEST_FILE.properties" - export JVM_VERSION=${TEST_JVM_VERSION} - export JVM_VENDOR=${TEST_JVM_VENDOR} +# export JVM_VERSION=${TEST_JVM_VERSION} +# export JVM_VENDOR=${TEST_JVM_VENDOR} export JVMW_DEBUG=Y export USE_SYSTEM_JVM=N export JVMW_ORACLE_KEYCHAIN=JVM_WRAPPER_ORACLE diff --git a/src/test/bash/old/jdk.00.sh b/wrapper-sh/src/test/bash/old/jdk.00.sh similarity index 100% rename from src/test/bash/old/jdk.00.sh rename to wrapper-sh/src/test/bash/old/jdk.00.sh diff --git a/src/test/bash/old/jdk.01.sh b/wrapper-sh/src/test/bash/old/jdk.01.sh similarity index 100% rename from src/test/bash/old/jdk.01.sh rename to wrapper-sh/src/test/bash/old/jdk.01.sh diff --git a/src/test/bash/old/jdk.02.sh b/wrapper-sh/src/test/bash/old/jdk.02.sh similarity index 100% rename from src/test/bash/old/jdk.02.sh rename to wrapper-sh/src/test/bash/old/jdk.02.sh diff --git a/src/test/bash/old/jdk.03.system.sh b/wrapper-sh/src/test/bash/old/jdk.03.system.sh similarity index 100% rename from src/test/bash/old/jdk.03.system.sh rename to wrapper-sh/src/test/bash/old/jdk.03.system.sh diff --git a/src/test/bash/old/jdk.04.system.sh b/wrapper-sh/src/test/bash/old/jdk.04.system.sh similarity index 100% rename from src/test/bash/old/jdk.04.system.sh rename to wrapper-sh/src/test/bash/old/jdk.04.system.sh diff --git a/src/test/bash/old/jdk.05.system.sh b/wrapper-sh/src/test/bash/old/jdk.05.system.sh similarity index 100% rename from src/test/bash/old/jdk.05.system.sh rename to wrapper-sh/src/test/bash/old/jdk.05.system.sh diff --git a/src/test/bash/old/jdk.06.system.sh b/wrapper-sh/src/test/bash/old/jdk.06.system.sh similarity index 100% rename from src/test/bash/old/jdk.06.system.sh rename to wrapper-sh/src/test/bash/old/jdk.06.system.sh diff --git a/src/test/bash/old/jvm.00.sh b/wrapper-sh/src/test/bash/old/jvm.00.sh similarity index 100% rename from src/test/bash/old/jvm.00.sh rename to wrapper-sh/src/test/bash/old/jvm.00.sh diff --git a/src/test/bash/old/jvm.01.sh b/wrapper-sh/src/test/bash/old/jvm.01.sh similarity index 100% rename from src/test/bash/old/jvm.01.sh rename to wrapper-sh/src/test/bash/old/jvm.01.sh diff --git a/src/test/bash/old/jvm.02.sh b/wrapper-sh/src/test/bash/old/jvm.02.sh similarity index 100% rename from src/test/bash/old/jvm.02.sh rename to wrapper-sh/src/test/bash/old/jvm.02.sh diff --git a/src/test/bash/old/jvm.03.sh b/wrapper-sh/src/test/bash/old/jvm.03.sh similarity index 100% rename from src/test/bash/old/jvm.03.sh rename to wrapper-sh/src/test/bash/old/jvm.03.sh diff --git a/src/test/bash/old/jvm.04.reuse.sh b/wrapper-sh/src/test/bash/old/jvm.04.reuse.sh similarity index 100% rename from src/test/bash/old/jvm.04.reuse.sh rename to wrapper-sh/src/test/bash/old/jvm.04.reuse.sh diff --git a/src/test/bash/jvmw/core.bats b/wrapper-sh/src/test/bash/part_core.bats similarity index 84% rename from src/test/bash/jvmw/core.bats rename to wrapper-sh/src/test/bash/part_core.bats index b232e67..a48963f 100644 --- a/src/test/bash/jvmw/core.bats +++ b/wrapper-sh/src/test/bash/part_core.bats @@ -3,7 +3,7 @@ @test "check_checksum_JVM_LESS_8" { export JVM_VERSION_MAJOR=7 - load ../../../main/bash/jvmw/core + load ../../main/bash/core run check_checksum [[ "$status" -eq 0 ]] @@ -14,7 +14,7 @@ export ARCHIVE_FILE="./src/test/resources/Test.java" export ARCHIVE_JVM_CHECKSUM=e349b9956e2ce5046579bc9fc7a125ed6ba309d3fcf39a95d1bf4a5ac32b9285 - load ../../../main/bash/jvmw/core + load ../../main/bash/core run check_checksum [[ "$status" -eq 0 ]] @@ -25,7 +25,7 @@ } @test "JVMW_HOME default" { - load ../../../main/bash/jvmw/core + load ../../main/bash/core echo "JVMW_HOME=${JVMW_HOME}" [[ "$JVMW_HOME" == "$HOME/.jvm" ]] @@ -33,7 +33,7 @@ @test "JVMW_HOME custom" { export JVMW_HOME=test - load ../../../main/bash/jvmw/core + load ../../main/bash/core echo "JVMW_HOME=${JVMW_HOME}" [[ "$JVMW_HOME" == "test" ]] diff --git a/src/test/bash/jvmw/download.bats b/wrapper-sh/src/test/bash/part_download.bats similarity index 78% rename from src/test/bash/jvmw/download.bats rename to wrapper-sh/src/test/bash/part_download.bats index bb108d2..32674bf 100644 --- a/src/test/bash/jvmw/download.bats +++ b/wrapper-sh/src/test/bash/part_download.bats @@ -10,11 +10,11 @@ setup() { eval "export $line" done < "src/test/resources/test.env/$ENV_TEST_FILE.properties" - load ../../../main/bash/jvmw/core - load ../../../main/bash/jvmw/download - load ../../../main/bash/jvmw/download_oracle - load ../../../main/bash/jvmw/download_openjdk - load ../../../main/bash/jvmw/unpack + load ../../main/bash/core + load ../../main/bash/download + load ../../main/bash/download_oracle + load ../../main/bash/download_openjdk + load ../../main/bash/unpack echo '----------' env diff --git a/wrapper-sh/src/test/bash/test_docker_suite.sh b/wrapper-sh/src/test/bash/test_docker_suite.sh new file mode 100755 index 0000000..a648412 --- /dev/null +++ b/wrapper-sh/src/test/bash/test_docker_suite.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Hack for code verification +ENV_TEST_FILE=${ENV_TEST_FILE:?} +DOCKER_IMAGE=${DOCKER_IMAGE:?} +# + +DOCKER_TAG=${DOCKER_IMAGE%%:*} +DOCKER_TAG=${DOCKER_TAG%%/*} + +DOCKER_SCRIPT=${PWD}/src/test/bash/travis_ci/script_docker.${DOCKER_TAG}.sh + +export DOCKER_IMAGE +echo ":: :: execute '${DOCKER_SCRIPT}'..." +${DOCKER_SCRIPT} || exit 1 diff --git a/wrapper-sh/src/test/bash/test_suite.sh b/wrapper-sh/src/test/bash/test_suite.sh new file mode 100755 index 0000000..91bc931 --- /dev/null +++ b/wrapper-sh/src/test/bash/test_suite.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +#ORIGIN_PWD=$PWD +# Hack for code verification +ENV_TEST_FILE=${ENV_TEST_FILE:?} + +while IFS='' read -r line || [[ -n "$line" ]]; do + eval "export ${line}" 1> /dev/null +done <"samples.properties/${ENV_TEST_FILE}.env" + +# shellcheck disable=SC1090 +#source "./test.env/$ENV_TEST_FILE.env" + +# Hack for code verification +TEST_TYPE=${TEST_TYPE:?} +TEST_FULL_VERSION=${TEST_FULL_VERSION:?} +TEST_REUSE_JAVA_VERSION=${TEST_REUSE_JAVA_VERSION} +# + +shellcheck builder.bash +bash builder.bash +bats -p src/test/bash/jvmw.bats && bats -p src/test/bash/part_*.bats +build/jvmw java -version +build/jvmw java -fullversion diff --git a/wrapper-sh/src/test/bash/travis_ci/script_docker.base.sh b/wrapper-sh/src/test/bash/travis_ci/script_docker.base.sh new file mode 100755 index 0000000..663efb6 --- /dev/null +++ b/wrapper-sh/src/test/bash/travis_ci/script_docker.base.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Hack for code verification +DOCKER_IMAGE=${DOCKER_IMAGE:?} + +# shellcheck disable=SC2086,SC2140 +docker run \ +--rm \ +-it \ +-e ORACLE_USER \ +-e ORACLE_PASSWORD \ +-e ENV_TEST_FILE \ +-v "${PWD}/src":"/opt/jvmw-prj/src":ro \ +-v "${PWD}/builder.bash":"/opt/jvmw-prj/builder.bash":ro \ +-v "${PWD}/../samples.properties":/opt/jvmw-prj/samples.properties \ + ${DOCKER_IMAGE} bash -c "pacman -Sy --noconfirm curl wget xz git && /opt/jvmw-prj/src/test/bash/docker_tests.sh" diff --git a/wrapper-sh/src/test/bash/travis_ci/script_docker.centos.sh b/wrapper-sh/src/test/bash/travis_ci/script_docker.centos.sh new file mode 100755 index 0000000..7664465 --- /dev/null +++ b/wrapper-sh/src/test/bash/travis_ci/script_docker.centos.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Hack for code verification +DOCKER_IMAGE=${DOCKER_IMAGE:?} + +# shellcheck disable=SC2086,SC2140 +docker run \ +--rm \ +-it \ +-e ORACLE_USER \ +-e ORACLE_PASSWORD \ +-e ENV_TEST_FILE \ +-v "${PWD}/src":"/opt/jvmw-prj/src":ro \ +-v "${PWD}/builder.bash":"/opt/jvmw-prj/builder.bash":ro \ +-v "${PWD}/../samples.properties":/opt/jvmw-prj/samples.properties \ + ${DOCKER_IMAGE} bash -c "yum install -y git xz wget && /opt/jvmw-prj/src/test/bash/docker_tests.sh" diff --git a/wrapper-sh/src/test/bash/travis_ci/script_docker.debian.sh b/wrapper-sh/src/test/bash/travis_ci/script_docker.debian.sh new file mode 100755 index 0000000..20a8971 --- /dev/null +++ b/wrapper-sh/src/test/bash/travis_ci/script_docker.debian.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Hack for code verification +DOCKER_IMAGE=${DOCKER_IMAGE:?} + +# shellcheck disable=SC2086,SC2140 +docker run \ +--rm \ +-it \ +-e ORACLE_USER \ +-e ORACLE_PASSWORD \ +-e ENV_TEST_FILE \ +-v "${PWD}/src":"/opt/jvmw-prj/src":ro \ +-v "${PWD}/builder.bash":"/opt/jvmw-prj/builder.bash":ro \ +-v "${PWD}/../samples.properties":/opt/jvmw-prj/samples.properties \ + ${DOCKER_IMAGE} bash -c "apt-get update && apt-get install -y curl wget xz-utils git && /opt/jvmw-prj/src/test/bash/docker_tests.sh" diff --git a/wrapper-sh/src/test/bash/travis_ci/script_docker.opensuse.sh b/wrapper-sh/src/test/bash/travis_ci/script_docker.opensuse.sh new file mode 100755 index 0000000..7efaa13 --- /dev/null +++ b/wrapper-sh/src/test/bash/travis_ci/script_docker.opensuse.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Hack for code verification +DOCKER_IMAGE=${DOCKER_IMAGE:?} + +# shellcheck disable=SC2086,SC2140 +docker run \ +--rm \ +-it \ +-e ORACLE_USER \ +-e ORACLE_PASSWORD \ +-e ENV_TEST_FILE \ +-v "${PWD}/src":"/opt/jvmw-prj/src":ro \ +-v "${PWD}/builder.bash":"/opt/jvmw-prj/builder.bash":ro \ +-v "${PWD}/../samples.properties":/opt/jvmw-prj/samples.properties \ + ${DOCKER_IMAGE} bash -c "zypper in -nfyl curl tar wget xz git && /opt/jvmw-prj/src/test/bash/docker_tests.sh" diff --git a/wrapper-sh/src/test/bash/travis_ci/script_docker.ubuntu.sh b/wrapper-sh/src/test/bash/travis_ci/script_docker.ubuntu.sh new file mode 100755 index 0000000..c5c687a --- /dev/null +++ b/wrapper-sh/src/test/bash/travis_ci/script_docker.ubuntu.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Hack for code verification +DOCKER_IMAGE=${DOCKER_IMAGE:?} + +# shellcheck disable=SC2086,SC2140 +docker run \ +--rm \ +-it \ +-e ORACLE_USER \ +-e ORACLE_PASSWORD \ +-e ENV_TEST_FILE \ +-v "${PWD}/src":"/opt/jvmw-prj/src":ro \ +-v "${PWD}/builder.bash":"/opt/jvmw-prj/builder.bash":ro \ +-v "${PWD}/../samples.properties":/opt/jvmw-prj/samples.properties \ +${DOCKER_IMAGE} bash -c "sudo apt-get update && sudo apt-get install -y curl wget xz-utils git && /opt/jvmw-prj/src/test/bash/docker_tests.sh" diff --git a/src/test/resources/Test.java b/wrapper-sh/src/test/resources/Test.java similarity index 100% rename from src/test/resources/Test.java rename to wrapper-sh/src/test/resources/Test.java diff --git a/src/test/resources/gradle/build.gradle b/wrapper-sh/src/test/resources/gradle/build.gradle similarity index 100% rename from src/test/resources/gradle/build.gradle rename to wrapper-sh/src/test/resources/gradle/build.gradle diff --git a/src/test/resources/gradle/gradle/wrapper/gradle-wrapper.jar b/wrapper-sh/src/test/resources/gradle/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from src/test/resources/gradle/gradle/wrapper/gradle-wrapper.jar rename to wrapper-sh/src/test/resources/gradle/gradle/wrapper/gradle-wrapper.jar diff --git a/src/test/resources/gradle/gradle/wrapper/gradle-wrapper.properties b/wrapper-sh/src/test/resources/gradle/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from src/test/resources/gradle/gradle/wrapper/gradle-wrapper.properties rename to wrapper-sh/src/test/resources/gradle/gradle/wrapper/gradle-wrapper.properties diff --git a/src/test/resources/gradle/gradlew b/wrapper-sh/src/test/resources/gradle/gradlew similarity index 100% rename from src/test/resources/gradle/gradlew rename to wrapper-sh/src/test/resources/gradle/gradlew diff --git a/src/test/resources/gradle/gradlew.bat b/wrapper-sh/src/test/resources/gradle/gradlew.bat similarity index 100% rename from src/test/resources/gradle/gradlew.bat rename to wrapper-sh/src/test/resources/gradle/gradlew.bat diff --git a/src/test/resources/gradle/src/main/java/test/Test.java b/wrapper-sh/src/test/resources/gradle/src/main/java/test/Test.java similarity index 100% rename from src/test/resources/gradle/src/main/java/test/Test.java rename to wrapper-sh/src/test/resources/gradle/src/main/java/test/Test.java diff --git a/src/test/resources/test.env.old/oracle-10_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-10_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-10_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-10_01.sh diff --git a/src/test/resources/test.env.old/oracle-8_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-8_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-8_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-8_01.sh diff --git a/src/test/resources/test.env.old/oracle-8u144_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-8u144_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-8u144_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-8u144_01.sh diff --git a/src/test/resources/test.env.old/oracle-8u171_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-8u171_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-8u171_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-8u171_01.sh diff --git a/src/test/resources/test.env.old/oracle-8u172_00.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-8u172_00.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-8u172_00.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-8u172_00.sh diff --git a/src/test/resources/test.env.old/oracle-8u172_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-8u172_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-8u172_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-8u172_01.sh diff --git a/src/test/resources/test.env.old/oracle-9.0.1_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-9.0.1_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-9.0.1_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-9.0.1_01.sh diff --git a/src/test/resources/test.env.old/oracle-9.0.4_00.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-9.0.4_00.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-9.0.4_00.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-9.0.4_00.sh diff --git a/src/test/resources/test.env.old/oracle-9.0.4_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-9.0.4_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-9.0.4_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-9.0.4_01.sh diff --git a/src/test/resources/test.env.old/oracle-9_00.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-9_00.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-9_00.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-9_00.sh diff --git a/src/test/resources/test.env.old/oracle-9_01.sh b/wrapper-sh/src/test/resources/test.env.old/oracle-9_01.sh similarity index 100% rename from src/test/resources/test.env.old/oracle-9_01.sh rename to wrapper-sh/src/test/resources/test.env.old/oracle-9_01.sh