Skip to content

Commit ae5d94a

Browse files
authored
Latest jdk wrapper. (#189)
1 parent 9c65965 commit ae5d94a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jdk-wrapper.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ safe_command() {
4343
checksum() {
4444
l_file="$1"
4545
checksum_exec=""
46+
checksum_args=""
4647
if command -v sha256sum > /dev/null; then
4748
checksum_exec="sha256sum"
4849
elif command -v shasum > /dev/null; then
49-
checksum_exec="shasum -a 256"
50+
checksum_exec="shasum"
51+
checksum_args="-a 256"
5052
elif command -v sha1sum > /dev/null; then
5153
checksum_exec="sha1sum"
5254
elif command -v md5 > /dev/null; then
@@ -56,7 +58,7 @@ checksum() {
5658
log_err "ERROR: No supported checksum command found!"
5759
exit 1
5860
fi
59-
"${checksum_exec}" < "${l_file}"
61+
${checksum_exec} ${checksum_args} < "${l_file}"
6062
}
6163

6264
rand() {
@@ -180,9 +182,11 @@ download_if_needed "${jdkw_wrapper}" "${jdkw_path}"
180182
# Run the command in the backround (with all the trouble that entails)
181183
# NOTE: Alternatively convert this to an exec if we don't need to output the
182184
# wrapper mismatch at the end; e.g. make that a hard precondition to running.
185+
set -m
183186
trap 'kill -TERM ${impl_pid}' TERM INT
184187
"${jdkw_path}/${jdkw_impl}" "$@" &
185188
impl_pid=$!
189+
fg
186190
wait ${impl_pid} > /dev/null 2>&1
187191
wait_result=$?
188192
if [ ${wait_result} -ne 127 ]; then

0 commit comments

Comments
 (0)