From 074b356803bbfda3ec9001403ad8f015abe085dd Mon Sep 17 00:00:00 2001 From: tech189 Date: Sun, 28 Aug 2022 20:43:11 +0100 Subject: [PATCH] microsoft*-jdk: Fix extract_dir issues (#420) Relates to #390 and https://github.com/ScoopInstaller/Java/commit/901d714b818da4243411c6142427be5239f0e817#commitcomment-82031895 Uses installer script from temurin-nightly-jdk --- bucket/microsoft-lts-jdk.json | 8 +++++++- bucket/microsoft11-jdk.json | 8 +++++++- bucket/microsoft16-jdk.json | 8 +++++++- bucket/microsoft17-jdk.json | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/bucket/microsoft-lts-jdk.json b/bucket/microsoft-lts-jdk.json index e8070f547..d10f883b5 100644 --- a/bucket/microsoft-lts-jdk.json +++ b/bucket/microsoft-lts-jdk.json @@ -9,7 +9,13 @@ "hash": "b9e08501875e61c2c9a1f0375fa61327b476d4bcc3c1f4389531d2c9cbe23011" } }, - "extract_dir": "jdk-17.0+4", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft11-jdk.json b/bucket/microsoft11-jdk.json index 87e7578dc..23b48535e 100644 --- a/bucket/microsoft11-jdk.json +++ b/bucket/microsoft11-jdk.json @@ -9,7 +9,13 @@ "hash": "4670febc7d9aa1ad9ac121d46c02ae7041035e262253b9912dba999a9279be75" } }, - "extract_dir": "jdk-11.0+16", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft16-jdk.json b/bucket/microsoft16-jdk.json index 9013e887b..174b749fd 100644 --- a/bucket/microsoft16-jdk.json +++ b/bucket/microsoft16-jdk.json @@ -9,7 +9,13 @@ "hash": "2911ef05fc64fd9f6a992807416f3806f1862a545fe2fd72b87fcdd1ad9371ca" } }, - "extract_dir": "jdk-16.0.2+7", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir" diff --git a/bucket/microsoft17-jdk.json b/bucket/microsoft17-jdk.json index e8070f547..d10f883b5 100644 --- a/bucket/microsoft17-jdk.json +++ b/bucket/microsoft17-jdk.json @@ -9,7 +9,13 @@ "hash": "b9e08501875e61c2c9a1f0375fa61327b476d4bcc3c1f4389531d2c9cbe23011" } }, - "extract_dir": "jdk-17.0+4", + "extract_to": "tmp", + "installer": { + "script": [ + "(Get-ChildItem -Directory \"$dir\\tmp\").FullName | % { Move-Item \"$_\\*\" \"$dir\" }", + "Remove-Item -Recurse \"$dir\\tmp\"" + ] + }, "env_add_path": "bin", "env_set": { "JAVA_HOME": "$dir"