Closed mig4 closed 5 years ago
OK, I tested it again and I can't find any issue(s)...I think we can merge this one :sunglasses:
Thank you @mig4 and @x80486. Will merge ASAP. My apologies for the wait, I was missing notifications from github.
@mig4 and @x80486 Could I trouble you guys to help me test #6? Thank you!
Resolved in #6
Create and automatically clean-up a temporary directory.
This makes the process compliant with asdf requirements to avoid writing to
ASDF_INSTALL_PATH
until the download, extraction and build are done to avoid racing with other processes trying to access the JDK. https://github.com/asdf-vm/asdf/blob/master/docs/creating-plugins.md#bininstallSince the directory is automatically cleaned up on exit, functions that extract the archives don't need to worry about cleaning up individual files as long as they are written to the working directory.
Also fix a problem with word splitting of
versionstr
- if unquoted, the value is split by the shell before passing it toread
which meant thatdistro
was actually being assigned DISTRO SPACE VERSION and version was an empty string, it only worked further down coincidentally because the variables weren't quoted sodistro
was subject to word splitting before being passed toget_java
andunpack_java
.