fix: macOS distro uncompressing on macOS
This commit is contained in:
parent
5ecb3eabdb
commit
436c7cae3d
13
warp4j
13
warp4j
@ -497,8 +497,19 @@ function ensure_distro_unpacked() {
|
||||
tar --strip-components=1 -C $unpacked_dir -xzf $download_dir/*.tar.gz
|
||||
;;
|
||||
$MAC)
|
||||
# to uncompess distro for macOS we need to use wildcards
|
||||
# to use wildcards with GNU tar (on Linux) '--wildcard' option is required
|
||||
# to use wildcards with BSD tar (on macOS) no options required
|
||||
# if invoked with '--wildcards' BSD tar with exit with message:
|
||||
# "Option --wildcards is not supported"
|
||||
local tar_cmd
|
||||
if tar --wildcards 2>&1 | grep "not supported" > /dev/null ; then
|
||||
tar_cmd="tar"
|
||||
else
|
||||
tar_cmd="tar --wildcards"
|
||||
fi
|
||||
mkdir -p $unpacked_dir
|
||||
tar --wildcards --strip-components=3 -C $unpacked_dir -xzf $download_dir/*.tar.gz \
|
||||
$tar_cmd --strip-components=3 -C $unpacked_dir -xzf $download_dir/*.tar.gz \
|
||||
"jdk*/Contents/Home"
|
||||
;;
|
||||
$WIN)
|
||||
|
Loading…
Reference in New Issue
Block a user